From: | jef peeraer <jef(dot)peeraer(at)telenet(dot)be> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | upgrade 8.1.4 -> latest, sort order subquery |
Date: | 2007-06-26 19:52:02 |
Message-ID: | 46816E62.5040408@telenet.be |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
i decide this weekend to upgrade to the latest stable version from an
8.1.4 . Upgrade went smootly, as usual, but today, i've got some
phonecalls of something weird. The query is as follows :
registratie=# select * from module_info where type_module_id = 1;
naam | korte_beschrijving | kolom_naam | xul_opties |
type_veld_id | lengte | is_verplicht | type_module_id
--------+--------------------+---------------+-----------------+--------------+--------+--------------+----------------
alg_02 | naam | naam | |
3 | 0 | f | 1
alg_03 | voornaam | voornamen | |
3 | 0 | f | 1
alg_01 | anoniem | anoniem | |
2 | 0 | f | 1
cl_01 | geslacht | geslacht | |
1 | 0 | t | 1
cl_19 | geboortedatum | geboortedatum | hide_clock,true |
7 | 0 | f | 1
cl_02 | leeftijd | leeftijd | |
1 | 0 | t | 1
cl_15 | origine | origine | |
1 | 0 | f | 1
(7 rows)
i combine this with the next query in a subquery
registratie=# select * from get_parent_type_modules(1);
NOTICE: first query
get_parent_type_modules
-------------------------
1
(1 row)
The resulting query , which should return the same result as the first one
registratie=# select * from module_info where type_module_id in
(select * from get_parent_type_modules(1));
NOTICE: first query
naam | korte_beschrijving | kolom_naam | xul_opties |
type_veld_id | lengte | is_verplicht | type_module_id
--------+--------------------+---------------+-----------------+--------------+--------+--------------+----------------
cl_15 | origine | origine | |
1 | 0 | f | 1
cl_02 | leeftijd | leeftijd | |
1 | 0 | t | 1
cl_19 | geboortedatum | geboortedatum | hide_clock,true |
7 | 0 | f | 1
cl_01 | geslacht | geslacht | |
1 | 0 | t | 1
alg_01 | anoniem | anoniem | |
2 | 0 | f | 1
alg_03 | voornaam | voornamen | |
3 | 0 | f | 1
alg_02 | naam | naam | |
3 | 0 | f | 1
(7 rows)
The order is completely ignored, although there is an order by in the view
'module_info'
jef peeraer
From | Date | Subject | |
---|---|---|---|
Next Message | Andrej Ricnik-Bay | 2007-06-26 19:52:33 | Re: yet another simple SQL question |
Previous Message | kdealba@uaaan.mx | 2007-06-26 19:41:49 | Ordering in SELECT statement |