Re: Schema variables - new implementation for Postgres 15

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: Schema variables - new implementation for Postgres 15
Дата
Msg-id 6068cabd-cf58-a055-7f92-886617759c2b@xs4all.nl
обсуждение исходный текст
Ответ на Re: Schema variables - new implementation for Postgres 15  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Schema variables - new implementation for Postgres 15  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Schema variables - new implementation for Postgres 15  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Op 24-08-2022 om 08:37 schreef Pavel Stehule:
>>
> 
> I fixed these.
> 

 > [v20220824-1-*.patch]

Hi Pavel,

I noticed just now that variable assignment (i.e., LET) unexpectedly 
(for me anyway) cast the type of the input value. Surely that's wrong? 
The documentation says clearly enough:

'The result must be of the same data type as the session variable.'


Example:

create variable x integer;
let x=1.5;
select x, pg_typeof(x);
  x | pg_typeof
---+-----------
  2 | integer
(1 row)


Is this correct?

If such casts (there are several) are intended then the text of the 
documentation should be changed.

Thanks,

Erik




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

Предыдущее
От: Alexander Pyhalov
Дата:
Сообщение: Add semi-join pushdown to postgres_fdw
Следующее
От: talk to ben
Дата:
Сообщение: Re: archive modules