Re: PL/pgSQL doesn't support variables in queries?

2023-05-03 Thread J.A.
So is this possible? -JA- On Wed, 3 May 2023 at 23:29, Tom Lane wrote: > "J.A." writes: > > I must admit, I did try doing something like you suggested Erik. I tried > > things like: > > > DO $$ > > DECLARE > > v_application_id uuid; &g

Re: PL/pgSQL doesn't support variables in queries?

2023-05-03 Thread J.A.
maybe via the v_record "record" variable instead? -JA- On Wed, 3 May 2023 at 22:39, Erik Wienhold wrote: > > On 03/05/2023 14:25 CEST J.A. > wrote: > > > > ms-sql person here migrating over to pgsql. One of the first thing's I > noticed > > with pg

PL/pgSQL doesn't support variables in queries?

2023-05-03 Thread J.A.
Heya folks :) ms-sql person here migrating over to pgsql. One of the first thing's I noticed with pgsql (or more specifically, PL/pgSQL) is that it doesn't support "variables" in a query? for example, here's some T-SQL: DECLARE @fkId INTEGER SELECT @fkId = fkId FROM SomeTable WHERE id = 1 -- a