https://stackoverflow.com/questions/76339408/gracefully-handle-datatime-in-postgresql/76345292?noredirect=1#comment134659364_76345292
Just a few notes on this issue:
PSQL:
Appears to be applying the filter to all the columns in the table after the join.
TSQL:
Tried to duplicate this behavior and got these results.
select t1.id as t1id,
cast(cast(t1.test_value as varchar(max)) as datetime) as tms
from table1 t1
join table2 t2
on t1.id = t2.id
where cast(cast(t1.test_value as varchar(max)) as datetime) > '2023-05-27'
These statements work as expected in SQL Server.
Let me know if you have any questions.
Ken McClarenDatabase Administrator
864.313.5997
Easley, SC
Instagram | LinkedIn | Facebook | Twitter
kipuhealth.com
pgsql-bugs by date:
Соглашаюсь с условиями обработки персональных данных