pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Harald Fuchs <hari.fuchs@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Window function trouble
Date: Thu, 10 Dec 2009 13:09:19 -0500
Message-ID: <25983.1260468559@sss.pgh.pa.us> (raw)
In-Reply-To: <pu7hsuafcq.fsf@srv.protecting.net>
References: <pud42mahnr.fsf@srv.protecting.net>
	<pu7hsuafcq.fsf@srv.protecting.net>

Harald Fuchs <hari.fuchs@gmail.com> writes:
> Apparently the CASE expression is named "adr" unless named
> otherwise, and the result set is sorted by this expression instead of
> the column named "adr".  Does anyone know what the SQL standard says
> about that?

The SQL standard says the default name for any output column other
than a simple column reference is implementation-dependent.  I think
our implementation involves looking at the default value for a CASE.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <25983.1260468559@sss.pgh.pa.us>
Permalink:  ../25983.1260468559@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25983.1260468559@sss.pgh.pa.us

 · 

reply

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, hari.fuchs@gmail.com
  Subject: Re: Window function trouble
  In-Reply-To: <25983.1260468559@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