1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00
Files
postgres/src/backend
Tom Lane 707867e9fd When we have successfully optimized a MIN or MAX aggregate into an indexscan,
the query result must be exactly one row (since we don't do this when there's
any GROUP BY).  Therefore any ORDER BY or DISTINCT attached to the query is
useless and can be dropped.  Aside from saving useless cycles, this protects
us against problems with matching the hacked-up tlist entries to sort clauses,
as seen in a bug report from Taiki Yamaguchi.  We might need to work harder
if we ever try to optimize grouped queries with this approach, but this
solution will do for now.
2008-03-27 19:06:23 +00:00
..
2008-03-14 04:46:30 +00:00
2008-03-14 04:46:30 +00:00