Re: Schema variables - new implementation for Postgres 15

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Joel Jacobson <joel(at)compiler(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Schema variables - new implementation for Postgres 15
Date: 2022-08-24 08:04:45
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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.'


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.



In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message talk to ben 2022-08-24 08:05:55 Re: archive modules
Previous Message Alexander Pyhalov 2022-08-24 07:25:46 Add semi-join pushdown to postgres_fdw