Re: BUG #19751: MIN aggregate + FETCH FIRST 1 ROW WITH TIES causes false 21000 error when index scan is forced - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19751: MIN aggregate + FETCH FIRST 1 ROW WITH TIES causes false 21000 error when index scan is forced
Date
Msg-id 680155.1791213670@sss.pgh.pa.us
Whole thread
In response to BUG #19751: MIN aggregate + FETCH FIRST 1 ROW WITH TIES causes false 21000 error when index scan is forced  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> SELECT MIN(reading) AS minimum
> FROM (
>     SELECT reading
>     FROM readings
>     WHERE region_id = 2
> ) AS scoped
> ORDER BY minimum
> FETCH FIRST 1 ROW WITH TIES;
> Observed result:
> ERROR:  more than one row returned by a subquery used as an expression

Thanks for the report, but this was reported and fixed a couple
weeks ago:

https://www.postgresql.org/message-id/flat/19694-4e61bd0475398eef%40postgresql.org

            regards, tom lane



pgsql-bugs by date:

Previous
From: shihao zhong
Date:
Subject: Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs
Next
From: Rahul
Date:
Subject: Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs