diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-21 09:29:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-21 09:29:23 +0000 |
commit | dab6ba29e8eb9a5c2890ac3be8eab6e994aeb10e (patch) | |
tree | 0d209cfc6f7b9c794c254601c29aa5d8b9414876 /sqlglot/dialects/postgres.py | |
parent | Adding upstream version 7.1.3. (diff) | |
download | sqlglot-dab6ba29e8eb9a5c2890ac3be8eab6e994aeb10e.tar.xz sqlglot-dab6ba29e8eb9a5c2890ac3be8eab6e994aeb10e.zip |
Adding upstream version 9.0.1.upstream/9.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/postgres.py')
-rw-r--r-- | sqlglot/dialects/postgres.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py index c91ff4b..459e926 100644 --- a/sqlglot/dialects/postgres.py +++ b/sqlglot/dialects/postgres.py @@ -163,6 +163,7 @@ class Postgres(Dialect): class Tokenizer(Tokenizer): BIT_STRINGS = [("b'", "'"), ("B'", "'")] HEX_STRINGS = [("x'", "'"), ("X'", "'")] + BYTE_STRINGS = [("e'", "'"), ("E'", "'")] KEYWORDS = { **Tokenizer.KEYWORDS, "ALWAYS": TokenType.ALWAYS, @@ -176,6 +177,11 @@ class Postgres(Dialect): "SMALLSERIAL": TokenType.SMALLSERIAL, "UUID": TokenType.UUID, } + QUOTES = ["'", "$$"] + SINGLE_TOKENS = { + **Tokenizer.SINGLE_TOKENS, + "$": TokenType.PARAMETER, + } class Parser(Parser): STRICT_CAST = False |