summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/postgres.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-08 07:22:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-08 07:22:15 +0000
commit5b1ac5070c43c40a2b5bbc991198b0dddf45dc75 (patch)
treeed329138d5e8e5c9d5164b5c853d6f40a116f4d6 /sqlglot/dialects/postgres.py
parentReleasing debian version 11.3.0-1. (diff)
downloadsqlglot-5b1ac5070c43c40a2b5bbc991198b0dddf45dc75.tar.xz
sqlglot-5b1ac5070c43c40a2b5bbc991198b0dddf45dc75.zip
Merging upstream version 11.3.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/postgres.py')
-rw-r--r--sqlglot/dialects/postgres.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py
index 35076db..7e7902c 100644
--- a/sqlglot/dialects/postgres.py
+++ b/sqlglot/dialects/postgres.py
@@ -6,6 +6,7 @@ from sqlglot.dialects.dialect import (
arrow_json_extract_scalar_sql,
arrow_json_extract_sql,
format_time_lambda,
+ min_or_least,
no_paren_current_date_sql,
no_tablesample_sql,
no_trycast_sql,
@@ -229,6 +230,7 @@ class Postgres(Dialect):
"REFRESH": TokenType.COMMAND,
"REINDEX": TokenType.COMMAND,
"RESET": TokenType.COMMAND,
+ "RETURNING": TokenType.RETURNING,
"REVOKE": TokenType.COMMAND,
"SERIAL": TokenType.SERIAL,
"SMALLSERIAL": TokenType.SMALLSERIAL,
@@ -296,6 +298,7 @@ class Postgres(Dialect):
exp.DateSub: _date_add_sql("-"),
exp.DateDiff: _date_diff_sql,
exp.LogicalOr: rename_func("BOOL_OR"),
+ exp.Min: min_or_least,
exp.RegexpLike: lambda self, e: self.binary(e, "~"),
exp.RegexpILike: lambda self, e: self.binary(e, "~*"),
exp.StrPosition: str_position_sql,