plpgsql variable assignment with union is broken

From: easteregg(at)verfriemelt(dot)org
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: plpgsql variable assignment with union is broken
Date: 2021-01-05 20:12:57
Message-ID: 20210105201257.f0d76aff@mail.verfriemelt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi,

i updated our ci pipeline to the latest 14-devel build from the postgresql apt repository:

PostgreSQL 14devel (Debian 14~~devel~20210105.1140-1~285.gitbc43b7c.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-3) 10.2.1 20201224, 64-bit

i found, that the behaviour of variable assignment in combination with union is not working anymore:

DO $$
DECLARE t bool;
begin
t := a FROM ( SELECT true WHERE false ) t(a) UNION SELECT true AS a;
END $$;

before it worked with pg13 and 14-devel with this build:

PostgreSQL 14devel (Debian 14~~devel~20201126.0540-1~210.gitf3a8f73.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.0-16) 10.2.0, 64-bit

is this an intended change or is it a bug?

with kind regards,
richard

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2021-01-05 20:29:31 Re: Online checksums patch - once again
Previous Message Dmitry Dolgov 2021-01-05 19:33:55 Re: [HACKERS] [PATCH] Generic type subscripting