38 lines
666 B
SQL
38 lines
666 B
SQL
# name: test/sql/pragma/test_pragma_parsing.test
|
|
# description: Test PRAGMA parsing
|
|
# group: [pragma]
|
|
|
|
# Almost pragma but not quite
|
|
statement error
|
|
PRAG
|
|
----
|
|
Parser Error: syntax error at or near "PRAG"
|
|
|
|
# Pragma without a keyword
|
|
statement error
|
|
PRAGMA
|
|
----
|
|
<REGEX>:.*Parser Error.*syntax error at end of input.*
|
|
|
|
# Unknown pragma error
|
|
statement error
|
|
PRAGMA random_unknown_pragma
|
|
----
|
|
|
|
# Call pragma in wrong way
|
|
statement error
|
|
PRAGMA table_info = 3
|
|
----
|
|
|
|
statement ok
|
|
CREATE TABLE integers(i INTEGER)
|
|
|
|
# Now it should work
|
|
statement ok
|
|
PRAGMA table_info('integers');
|
|
|
|
# Parsing also works with extra spaces
|
|
statement ok
|
|
PRAGMA table_info ('integers');
|
|
|