diff options
Diffstat (limited to 'tests/dialects/test_postgres.py')
-rw-r--r-- | tests/dialects/test_postgres.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/dialects/test_postgres.py b/tests/dialects/test_postgres.py index 7a41cef..5a55a7d 100644 --- a/tests/dialects/test_postgres.py +++ b/tests/dialects/test_postgres.py @@ -50,6 +50,7 @@ class TestPostgres(Validator): self.validate_identity("STRING_AGG(DISTINCT x, ',' ORDER BY y DESC)") self.validate_identity("SELECT CASE WHEN SUBSTRING('abcdefg') IN ('ab') THEN 1 ELSE 0 END") self.validate_identity("COMMENT ON TABLE mytable IS 'this'") + self.validate_identity("COMMENT ON MATERIALIZED VIEW my_view IS 'this'") self.validate_identity("SELECT e'\\xDEADBEEF'") self.validate_identity("SELECT CAST(e'\\176' AS BYTEA)") self.validate_identity("SELECT * FROM x WHERE SUBSTRING('Thomas' FROM '...$') IN ('mas')") @@ -467,6 +468,12 @@ class TestPostgres(Validator): }, ) self.validate_all( + "SELECT DATE_PART('epoch', CAST('2023-01-04 04:05:06.789' AS TIMESTAMP))", + read={ + "": "SELECT TIME_TO_UNIX(TIMESTAMP '2023-01-04 04:05:06.789')", + }, + ) + self.validate_all( "x ^ y", write={ "": "POWER(x, y)", |