Adding upstream version 26.3.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
7ee28625fb
commit
b80c44840a
89 changed files with 59179 additions and 57645 deletions
|
@ -76,7 +76,10 @@ class TestPostgres(Validator):
|
|||
self.validate_identity("SELECT CURRENT_USER")
|
||||
self.validate_identity("SELECT * FROM ONLY t1")
|
||||
self.validate_identity(
|
||||
"SELECT id, name FROM XMLTABLE('/root/user' PASSING xml_data COLUMNS id INT PATH '@id', name TEXT PATH 'name/text()') AS t"
|
||||
"SELECT id, name FROM xml_data AS t, XMLTABLE('/root/user' PASSING t.xml COLUMNS id INT PATH '@id', name TEXT PATH 'name/text()') AS x"
|
||||
)
|
||||
self.validate_identity(
|
||||
"SELECT id, value FROM xml_content AS t, XMLTABLE(XMLNAMESPACES('http://example.com/ns1' AS ns1, 'http://example.com/ns2' AS ns2), '/root/data' PASSING t.xml COLUMNS id INT PATH '@ns1:id', value TEXT PATH 'ns2:value/text()') AS x"
|
||||
)
|
||||
self.validate_identity(
|
||||
"SELECT * FROM t WHERE some_column >= CURRENT_DATE + INTERVAL '1 day 1 hour' AND some_another_column IS TRUE"
|
||||
|
@ -830,6 +833,10 @@ class TestPostgres(Validator):
|
|||
"/* + some comment */ SELECT b.foo, b.bar FROM baz AS b",
|
||||
)
|
||||
|
||||
self.validate_identity(
|
||||
"SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY a) FILTER(WHERE CAST(b AS BOOLEAN)) AS mean_value FROM (VALUES (0, 't')) AS fake_data(a, b)"
|
||||
)
|
||||
|
||||
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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue