Re: BUG #2172: Problem with query in order by

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Vic <vic(at)stream(dot)net(dot)ua>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2172: Problem with query in order by
Date: 2006-01-17 02:46:50
Message-ID: 20060116184500.R36221@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 16 Jan 2006, Vic wrote:

>
> The following bug has been logged online:
>
> Bug reference: 2172
> Logged by: Vic
> Email address: vic(at)stream(dot)net(dot)ua
> PostgreSQL version: 8.0.6
> Operating system: FreeBSD 5.4/6.0
> Description: Problem with query in order by
> Details:
>
> when I send query
> "select *
> from nets a,systbl
> where a.type = systbl.tbl_
> and a.cid_ = 155
> and systbl.tblid = 'nettype'
> order by a.endd, net; " - all working fine,
> but
> when I write in "order by" next: "order by nets.endd,net"
> (I'm chane a. to nets. )
> postgres returrn me linked "a" table with "systbl" by where phrase, and also
> full link with nets table again

AFAIK, using nets.endd is incorrect, because it's name has been replaced
by the correlation name (a).

There's a GUC variable, add_missing_from that controls whether the table
is added to the from list again or that you get an error.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Zerolo 2006-01-17 05:34:42 Re: BUG #2175: 22021: invalid byte sequence for encoding \"UNICODE\":
Previous Message Roberto 2006-01-16 23:55:12 BUG #2175: 22021: invalid byte sequence for encoding \"UNICODE\":