Re: Schema variables - new implementation for Postgres 15 - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: Schema variables - new implementation for Postgres 15
Date
Msg-id 20240128200905.43isueieauhmkyjs@erthalion.local
Whole thread Raw
In response to Re: Schema variables - new implementation for Postgres 15  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
> On Sun, Jan 28, 2024 at 08:34:40PM +0100, Pavel Stehule wrote:
> > * I've noticed an interesting result when a LET statement is used to
> > assign a
> >   value without a subquery:
> >
> >         create variable test as text;
> >         -- returns NULL
> >         select test;
> >
> >         -- use repeat directly without a subquery
> >         let test = repeat("test", 100000);
> >
> >         -- returns NULL
> >         select test;
> >
> >   I was expecting to see an error here, is this a correct behaviour?
> >
>
> what is strange on this result?

Never mind, I've got confused about the quotes here -- it was referring
to the variable content, not a string.



pgsql-hackers by date:

Previous
From: Pavel Luzanov
Date:
Subject: Re: Things I don't like about \du's "Attributes" column
Next
From: Pavel Luzanov
Date:
Subject: Re: Things I don't like about \du's "Attributes" column