summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/postgres.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-24 08:03:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-24 08:03:48 +0000
commit36db14f4c6c28209371d563d76697df0172e337f (patch)
tree527347be54a38fc9b14fe1fa04c27a4bbae44016 /sqlglot/dialects/postgres.py
parentReleasing debian version 17.4.1-1. (diff)
downloadsqlglot-36db14f4c6c28209371d563d76697df0172e337f.tar.xz
sqlglot-36db14f4c6c28209371d563d76697df0172e337f.zip
Merging upstream version 17.7.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/postgres.py')
-rw-r--r--sqlglot/dialects/postgres.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py
index 7706456..d11cbd7 100644
--- a/sqlglot/dialects/postgres.py
+++ b/sqlglot/dialects/postgres.py
@@ -282,7 +282,6 @@ class Postgres(Dialect):
VAR_SINGLE_TOKENS = {"$"}
class Parser(parser.Parser):
- STRICT_CAST = False
CONCAT_NULL_OUTPUTS_STRING = True
FUNCTIONS = {
@@ -318,6 +317,11 @@ class Postgres(Dialect):
TokenType.LT_AT: binary_range_parser(exp.ArrayContained),
}
+ STATEMENT_PARSERS = {
+ **parser.Parser.STATEMENT_PARSERS,
+ TokenType.END: lambda self: self._parse_commit_or_rollback(),
+ }
+
def _parse_factor(self) -> t.Optional[exp.Expression]:
return self._parse_tokens(self._parse_exponent, self.FACTOR)