Re: SQL request change when upgrade from 7.0.2 to 7.1.3
От | Richard NAGY |
---|---|
Тема | Re: SQL request change when upgrade from 7.0.2 to 7.1.3 |
Дата | |
Msg-id | 3BA5B118.D4751A2D@presenceweb.com обсуждение исходный текст |
Ответ на | SQL request change when upgrade from 7.0.2 to 7.1.3 (Richard NAGY <richard@presenceweb.com>) |
Список | pgsql-sql |
Andre Schnabel a écrit : <blockquote type="CITE">Hello Richard, <p>I did some testing and after all your query should beordered right. <br />The test's I have done: <p>Test=# select t.foo1 from testtable t <br />Test-# union <br />Test-# selectt.foo2 from testtable t <br />Test-# order by t.foo1; <br />ERROR: Relation 't' does not exist <p>-------- Same erroras you get ---- <p>Test=# select t.foo1 from testtable t <br />Test-# union <br />Test-# select t.foo2 from testtablet <br />Test-# order by foo1; <br /> foo1 <br />------ <br /> abc <br /> cdef <br />(2 rows) <p>-------- OrderedAscending (maybe by chance?) --- <p>Test=# select t.foo1 from testtable t <br />Test-# union <br />Test-# select t.foo2from testtable t <br />Test-# order by foo1 DESC; <br /> foo1 <br />------ <br /> cdef <br /> abc <br />(2 rows) <p>----Ordered descending (ordering works!) --- <p>I guess, the table-alias is not known to the order-clause. Maybe the <br/>execution (or parsing) order of the UNION changed from 7.0 to 7.1.</blockquote> Hello Andre, <p>Thanks very much forhaving tested. Yes, it works well. <pre>-- Richard NAGY Presenceweb</pre>
В списке pgsql-sql по дате отправления: