Adding upstream version 18.2.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
9de781a59b
commit
ab14e550ff
124 changed files with 60313 additions and 50346 deletions
|
@ -126,6 +126,8 @@ class TestPostgres(Validator):
|
|||
)
|
||||
|
||||
def test_postgres(self):
|
||||
self.validate_identity("x @@ y")
|
||||
|
||||
expr = parse_one("SELECT * FROM r CROSS JOIN LATERAL UNNEST(ARRAY[1]) AS s(location)")
|
||||
unnest = expr.args["joins"][0].this.this
|
||||
unnest.assert_is(exp.Unnest)
|
||||
|
@ -534,6 +536,54 @@ class TestPostgres(Validator):
|
|||
"x::cstring",
|
||||
write={"postgres": "CAST(x AS CSTRING)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::oid",
|
||||
write={"postgres": "CAST(x AS OID)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regclass",
|
||||
write={"postgres": "CAST(x AS REGCLASS)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regcollation",
|
||||
write={"postgres": "CAST(x AS REGCOLLATION)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regconfig",
|
||||
write={"postgres": "CAST(x AS REGCONFIG)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regdictionary",
|
||||
write={"postgres": "CAST(x AS REGDICTIONARY)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regnamespace",
|
||||
write={"postgres": "CAST(x AS REGNAMESPACE)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regoper",
|
||||
write={"postgres": "CAST(x AS REGOPER)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regoperator",
|
||||
write={"postgres": "CAST(x AS REGOPERATOR)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regproc",
|
||||
write={"postgres": "CAST(x AS REGPROC)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regprocedure",
|
||||
write={"postgres": "CAST(x AS REGPROCEDURE)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regrole",
|
||||
write={"postgres": "CAST(x AS REGROLE)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"x::regtype",
|
||||
write={"postgres": "CAST(x AS REGTYPE)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"TRIM(BOTH 'as' FROM 'as string as')",
|
||||
write={
|
||||
|
@ -606,7 +656,7 @@ class TestPostgres(Validator):
|
|||
"a || b",
|
||||
write={
|
||||
"": "a || b",
|
||||
"clickhouse": "CONCAT(CAST(a AS TEXT), CAST(b AS TEXT))",
|
||||
"clickhouse": "CONCAT(CAST(a AS String), CAST(b AS String))",
|
||||
"duckdb": "a || b",
|
||||
"postgres": "a || b",
|
||||
"presto": "CONCAT(CAST(a AS VARCHAR), CAST(b AS VARCHAR))",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue