| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Pavel Kulakov <paul(dot)kulakov(at)systematica(dot)ru> |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #18195: PL/pgSQL: invalid syntax allowed in SELECT INTO statement |
| Date: | 2023-11-15 07:52:53 |
| Message-ID: | CAFj8pRAQCb+WsPuh9EYgY0F-p=o+7b1oA0Uubi4L=darg-SbZQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
st 15. 11. 2023 v 8:47 odesílatel Pavel Kulakov <paul(dot)kulakov(at)systematica(dot)ru>
napsal:
> This also permits the following syntax in PL/pgSQL:
>
> do $sql$
> declare _s text;
> begin
> _s = '1' somegarbage;
> end;
> $sql$;
>
> I understand why it works. But it looks really strange.
>
yes, it is strange, but PL/pgSQL is a translator from PL/pgSQL to SQL, and
'1 xxx' is the correct expression in SQL. Probably today, where PL/pgSQL
assign statements are supported in SQL parser the better design can be
implemented. But probably it should still be hard for SELECT INTO.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2023-11-15 09:04:28 | BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows |
| Previous Message | Pavel Kulakov | 2023-11-15 07:47:10 | RE: BUG #18195: PL/pgSQL: invalid syntax allowed in SELECT INTO statement |