From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bernd von den Brincken <bvdb@asa.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Rvsd. / Re: Named column in a Function fails at ORDER BY (PgSQL 7.1)
Date: Thu, 04 Apr 2002 12:03:22 -0500
Message-ID: <24118.1017939802@sss.pgh.pa.us> (raw)
In-Reply-To: <5.1.0.14.2.20020404020655.01cd3ea8@pop.kundenserver.de>
References: <5.1.0.14.2.20020403211109.01cf5e40@pop.kundenserver.de>
<5.1.0.14.2.20020403211109.01cf5e40@pop.kundenserver.de>
<5.1.0.14.2.20020404020655.01cd3ea8@pop.kundenserver.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, bvdb@asa.de
Subject: Re: Rvsd. / Re: Named column in a Function fails at ORDER BY (PgSQL 7.1)
In-Reply-To: <24118.1017939802@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox