1
0
Fork 0

Adding upstream version 26.2.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:59:57 +01:00
parent d908bee480
commit 7ee28625fb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
85 changed files with 57142 additions and 52288 deletions

View file

@ -32,6 +32,7 @@ from sqlglot.dialects.dialect import (
timestrtotime_sql,
trim_sql,
ts_or_ds_add_cast,
str_position_sql,
)
from sqlglot.helper import is_int, seq_get
from sqlglot.parser import binary_range_parser
@ -583,8 +584,7 @@ class Postgres(Dialect):
]
),
exp.SHA2: sha256_sql,
exp.StrPosition: lambda self,
e: f"POSITION({self.sql(e, 'substr')} IN {self.sql(e, 'this')})",
exp.StrPosition: str_position_sql,
exp.StrToDate: lambda self, e: self.func("TO_DATE", e.this, self.format_time(e)),
exp.StrToTime: lambda self, e: self.func("TO_TIMESTAMP", e.this, self.format_time(e)),
exp.StructExtract: struct_extract_sql,