Adding upstream version 11.1.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e09ae33d10
commit
85cdf062c9
95 changed files with 32569 additions and 30081 deletions
|
@ -10,6 +10,13 @@ class TestPostgres(Validator):
|
|||
self.validate_identity("CREATE TABLE test (foo HSTORE)")
|
||||
self.validate_identity("CREATE TABLE test (foo JSONB)")
|
||||
self.validate_identity("CREATE TABLE test (foo VARCHAR(64)[])")
|
||||
|
||||
self.validate_all(
|
||||
"CREATE OR REPLACE FUNCTION function_name (input_a character varying DEFAULT NULL::character varying)",
|
||||
write={
|
||||
"postgres": "CREATE OR REPLACE FUNCTION function_name(input_a VARCHAR DEFAULT CAST(NULL AS VARCHAR))",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"CREATE TABLE products (product_no INT UNIQUE, name TEXT, price DECIMAL)",
|
||||
write={
|
||||
|
@ -56,20 +63,7 @@ class TestPostgres(Validator):
|
|||
)
|
||||
|
||||
def test_postgres(self):
|
||||
self.validate_all(
|
||||
"x ^ y",
|
||||
write={
|
||||
"": "POWER(x, y)",
|
||||
"postgres": "x ^ y",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"x # y",
|
||||
write={
|
||||
"": "x ^ y",
|
||||
"postgres": "x # y",
|
||||
},
|
||||
)
|
||||
self.validate_identity("$x")
|
||||
self.validate_identity("SELECT ARRAY[1, 2, 3]")
|
||||
self.validate_identity("SELECT ARRAY(SELECT 1)")
|
||||
self.validate_identity("SELECT ARRAY_LENGTH(ARRAY[1, 2, 3], 1)")
|
||||
|
@ -112,6 +106,20 @@ class TestPostgres(Validator):
|
|||
self.validate_identity("x ~ 'y'")
|
||||
self.validate_identity("x ~* 'y'")
|
||||
|
||||
self.validate_all(
|
||||
"x ^ y",
|
||||
write={
|
||||
"": "POWER(x, y)",
|
||||
"postgres": "x ^ y",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"x # y",
|
||||
write={
|
||||
"": "x ^ y",
|
||||
"postgres": "x # y",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"GENERATE_SERIES(a, b, ' 2 days ')",
|
||||
write={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue