plpgsql variable assignment not supporting distinct anymore - Mailing list pgsql-hackers

From easteregg@verfriemelt.org
Subject plpgsql variable assignment not supporting distinct anymore
Date
Msg-id 20210122082119.8d428dd7@mail.verfriemelt.org
Whole thread Raw
List 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
distinctis 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



pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Next
From: Andrey Borodin
Date:
Subject: Re: Why does creating logical replication subscriptions require superuser?