Re: Rvsd. / Re: Named column in a Function fails at ORDER BY (PgSQL 7.1) - Mailing list pgsql-sql

From Tom Lane
Subject Re: Rvsd. / Re: Named column in a Function fails at ORDER BY (PgSQL 7.1)
Date
Msg-id 24118.1017939802@sss.pgh.pa.us
Whole thread Raw
In response to Rvsd. / Re: Named column in a Function fails at ORDER BY (PgSQL 7.1)  (Bernd von den Brincken <bvdb@asa.de>)
List pgsql-sql
Bernd von den Brincken <bvdb@asa.de> writes:
>> SQL99 seems to have (incompatibly) redefined ORDER BY to allow
>> expressions over the output column names, but I don't have a lot of
>> appetite for breaking existing applications in order to conform to the
>> SQL99 definition.

> Would it really break existing applications it this syntax would be possible?

Yes, it would.  The main problem with defining ORDER BY in terms of
output columns not input columns is that there is *no way* to write
an ordering spec that involves data not explicitly presented to the
user.  This is such an obvious point that I can't believe the SQL99
committee missed it.  Defining ORDER BY as they did does not create
any functional benefit, it is only a way of avoiding writing the
same expression twice --- but defining ORDER BY as we've historically
done it offers a functional benefit that would be lost if we changed
to the SQL99 interpretation.
        regards, tom lane


pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Date
Next
From: Tom Lane
Date:
Subject: Re: md5 auth