1
0
Fork 0

Merging upstream version 26.26.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-06-11 08:06:17 +02:00
parent 768f936511
commit 1ac9fca060
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
62 changed files with 938 additions and 453 deletions

View file

@ -22,6 +22,7 @@ class TestPostgres(Validator):
expected_sql = "ARRAY[\n x" + (",\n x" * 27) + "\n]"
self.validate_identity(sql, expected_sql, pretty=True)
self.validate_identity("SELECT ST_DISTANCE(gg1, gg2, FALSE) AS sphere_dist")
self.validate_identity("SHA384(x)")
self.validate_identity("1.x", "1. AS x")
self.validate_identity("|/ x", "SQRT(x)")
@ -908,6 +909,18 @@ FROM json_data, field_ids""",
},
)
# Postgres introduced ANY_VALUE in version 16
self.validate_all(
"SELECT ANY_VALUE(1) AS col",
write={
"postgres": "SELECT ANY_VALUE(1) AS col",
"postgres, version=16": "SELECT ANY_VALUE(1) AS col",
"postgres, version=17.5": "SELECT ANY_VALUE(1) AS col",
"postgres, version=15": "SELECT MAX(1) AS col",
"postgres, version=13.9": "SELECT MAX(1) AS col",
},
)
def test_ddl(self):
# Checks that user-defined types are parsed into DataType instead of Identifier
self.parse_one("CREATE TABLE t (a udt)").this.expressions[0].args["kind"].assert_is(