|
From: Wesley <wsh...@qx...> - 2001-08-07 04:19:23
|
I want to clarify to Jijo and anyone else interested in fixing up the SQL statments for PostgreSQL 7.1: the change in behaviour with 7.1 affects the use of table identifiers with fields in the ORDER BY clause of UNION SQL statements. Outside of UNION statement ORDER BY clauses, table identifiers are still perfectly fine, and often necessary. I think they're actually more compliant with the SQL standard now. The reason is that the ORDER BY has to be performed after all the tables have been merged via UNION; field names in the ORDER BY clause should be the field names that will be in the query's final output, as opposed to table.fieldnames from any of the individual SELECT statements that got merged together. Hopefully this will help narrow the search for queries that need to be adjusted. -- Wes Sheldahl wsh...@qx... |