From: | Richard NAGY <richard(at)presenceweb(dot)com> |
---|---|
To: | Andre Schnabel <A_Schnabel(at)t-online(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SQL request change when upgrade from 7.0.2 to 7.1.3 |
Date: | 2001-09-17 08:15:20 |
Message-ID: | 3BA5B118.D4751A2D@presenceweb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Andre Schnabel a écrit :
> Hello Richard,
>
> I did some testing and after all your query should be ordered right.
> The test's I have done:
>
> Test=# select t.foo1 from testtable t
> Test-# union
> Test-# select t.foo2 from testtable t
> Test-# order by t.foo1;
> ERROR: Relation 't' does not exist
>
> -------- Same error as you get ----
>
> Test=# select t.foo1 from testtable t
> Test-# union
> Test-# select t.foo2 from testtable t
> Test-# order by foo1;
> foo1
> ------
> abc
> cdef
> (2 rows)
>
> -------- Ordered Ascending (maybe by chance?) ---
>
> Test=# select t.foo1 from testtable t
> Test-# union
> Test-# select t.foo2 from testtable t
> Test-# order by foo1 DESC;
> foo1
> ------
> cdef
> abc
> (2 rows)
>
> ---- Ordered descending (ordering works!) ---
>
> I guess, the table-alias is not known to the order-clause. Maybe the
> execution (or parsing) order of the UNION changed from 7.0 to 7.1.
Hello Andre,
Thanks very much for having tested. Yes, it works well.
--
Richard NAGY
Presenceweb
From | Date | Subject | |
---|---|---|---|
Next Message | Richard NAGY | 2001-09-17 08:27:53 | Re: SQL request change when upgrade from 7.0.2 to 7.1.3 |
Previous Message | Richard NAGY | 2001-09-17 07:45:27 | Re: SQL request change when upgrade from 7.0.2 to 7.1.3 |