Changes between Initial Version and Version 1 of Ticket #24218, comment 2
- Timestamp:
- Jan 26, 2015, 11:27:19 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24218, comment 2
initial v1 1 1 Thanks for the patch! The feature idea generally makes sense to me - taking something that currently results in an error and making it instead return sane results. Tentatively accepting based on that. Some thoughts: 2 2 3 1. We need to check what the other core backends currently do with this query. If there are backends in which that query is currently an error, but this patch would change their results, that might be a problem.3 1. We need to check what the other core backends currently do with this query. If there are backends in which that query is currently not an error, but this patch would change their results, that might be a problem. 4 4 5 5 2. If I understand the Postgres docs correctly, your proposed subquery SQL results in an undefined/unpredictable selection of which actual row is chosen of each group where the `DISTINCT ON` query returns the same value. I guess if this is a problem, the answer is "make your `ORDER BY` match the `DISTINCT ON`", but it seems like a non-obvious subtlety that might bite people.