BUG #11803: avoid "distinct" logic if "limit 1" specified - Mailing list pgsql-bugs

From socketpair@gmail.com
Subject BUG #11803: avoid "distinct" logic if "limit 1" specified
Date
Msg-id 20141026214207.2612.157@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #11803: avoid "distinct" logic if "limit 1" specified  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11803
Logged by:          Korenberg Mark
Email address:      socketpair@gmail.com
PostgreSQL version: 9.3.1
Operating system:   Linux
Description:

In other words,

query:
select * from tablename order by id limit 1

and query:
select distinct * from tablename order by id limit 1

should be planned exactly (as if distinct was not specified)
-----------------------
https://github.com/ponyorm/pony/issues/90
http://doc.ponyorm.com/queries.html#comment-1654734639

pgsql-bugs by date:

Previous
From: piuschan
Date:
Subject: Re: BUG #11811: Server segfault with many subpartitions when using nestloop
Next
From: djlu126@126.com
Date:
Subject: BUG #11804: The delete rule problem