Re: BUG #2172: Problem with query in order by - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: BUG #2172: Problem with query in order by
Date
Msg-id 20060116184500.R36221@megazone.bigpanda.com
Whole thread Raw
In response to BUG #2172: Problem with query in order by  ("Vic" <vic@stream.net.ua>)
List 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@stream.net.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.

pgsql-bugs by date:

Previous
From: "Roberto"
Date:
Subject: BUG #2175: 22021: invalid byte sequence for encoding \"UNICODE\":
Next
From: tomas@tuxteam.de (Tomas Zerolo)
Date:
Subject: Re: BUG #2175: 22021: invalid byte sequence for encoding \"UNICODE\":