Re: plpgsql variable assignment not supporting distinct anymore

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

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> pá 22. 1. 2021 v 14:41 odesílatel <easteregg(at)verfriemelt(dot)org> napsal:
>> ERROR: syntax error at or near "DISTINCT"
>> LINE 8: _test := DISTINCT a FROM ( VALUES ( (true), ( true ) ) )...

> Using DISTINCT is not a good solution.

Yeah. It wouldn't be as painful to support this in the grammar
as it would be for UNION et al, so maybe we should just do it.
But I still find this to be mighty ugly plpgsql code.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Hilliard 2021-01-22 19:32:30 [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX.
Previous Message Tom Lane 2021-01-22 18:38:17 Re: [PATCH 1/1] Fix detection of pwritev support for OSX.