plpgsql variable assignment not supporting distinct anymore

From: easteregg(at)verfriemelt(dot)org
To: "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Subject: plpgsql variable assignment not supporting distinct anymore
Date: 2021-01-22 08:21:19
Message-ID: 20210122082119.8d428dd7@mail.verfriemelt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi,

no noticed after the assignment with union ( https://www.postgresql.org/message-id/flat/20210105201257.f0d76aff%40mail.verfriemelt.org ), that the assignment with distinct is broken aswell.

DO $$
DECLARE
_test bool;
BEGIN

_test := DISTINCT a FROM ( VALUES ( (true), ( true ) ) )t(a);

END $$;

i would argue, that thats a way more common usecase than the union, which was merely bad code.

tested with version 14~~devel~20210111.0540-1~299.gitce6a71f.pgdg110+1 from the apt repo

with kind redards,
richard

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2021-01-22 08:25:31 Re: Why does creating logical replication subscriptions require superuser?
Previous Message Greg Nancarrow 2021-01-22 08:19:54 Re: Parallel INSERT (INTO ... SELECT ...)