Order of operations in postgreSQL.

Поиск
Список
Период
Сортировка
От Ken McClaren
Тема Order of operations in postgreSQL.
Дата
Msg-id SJ0PR04MB7599D1DD3E866CF2D2F42012F9489@SJ0PR04MB7599.namprd04.prod.outlook.com
обсуждение исходный текст
Ответы RE: Order of operations in postgreSQL.  ("Wetmore, Matthew (CTR)" <Matthew.Wetmore@express-scripts.com>)
Список pgsql-bugs

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.

 

 

 

Logo

Description automatically generated

Ken McClaren
Database Administrator

 

864.313.5997

Easley, SC

Instagram | LinkedIn | Facebook | Twitter

kipuhealth.com 

 

 

 

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements
Следующее
От: "Wetmore, Matthew (CTR)"
Дата:
Сообщение: RE: Order of operations in postgreSQL.