Re: GROUP BY column alias?

From: "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: GROUP BY column alias?
Date: 2010-02-18 23:17:04
Message-ID: 2D59EF5A-09C5-4ED3-B851-B1C9FCB50923@tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Feb 18, 2010, at 5:52 PM, Scott Bailey wrote:

> SQL name resolution rules are that column names have higher precedence than aliases and variables. So it will always bind to the column not the alias.

That explains it. Thanks. Breaks the rule of least surprise, but it is SQL.

eric

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2010-02-19 00:26:54 Re: pgpool error, pid not found!
Previous Message Scott Bailey 2010-02-18 22:52:46 Re: GROUP BY column alias?