SQL request change when upgrade from 7.0.2 to 7.1.3

Поиск
Список
Период
Сортировка
От Richard NAGY
Тема SQL request change when upgrade from 7.0.2 to 7.1.3
Дата
Msg-id 3BA1D7DD.569B218C@presenceweb.com
обсуждение исходный текст
Ответы Re: SQL request change when upgrade from 7.0.2 to 7.1.3  ("Josh Berkus" <josh@agliodbs.com>)
Re: SQL request change when upgrade from 7.0.2 to 7.1.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hello, <p>Recently, I have upgraded my postgresql server from 7.0.2 to 7.1.3. But, now, one request which was 'good'
before,don't want to work any more now. <p>It was : (pretty long) <p>SELECT aes.ent_id, e.type, e.nom, aes.sect_id as
voulu,<br />cvd_new(current_date, e.date_entree, 'new') FROM ass_entrep_sectact aes, <br />entreprise e WHERE e.id =
aes.ent_idand aes.sect_id <> 3 and aes.sect_id <> 9 <br />and aes.sect_id <> 1 and aes.sect_id
<>13 and aes.sect_id = 56 <br />UNION <br />SELECT distinct on (aes.ent_id) aes.ent_id, e.type, e.nom,
aes.sect_id,<br />cvd_new(current_date, e.date_entree, 'new') FROM ass_entrep_sectact aes, <br />entreprise e WHERE
e.id= aes.ent_id and aes.sect_id <> 3 and aes.sect_id <> 9 <br />and aes.sect_id <> 1 and aes.sect_id
<>13 and aes.sect_id <> 56 and aes.ent_id <br />not in (SELECT ent_id FROM ass_entrep_sectact WHERE sect_id
=56 and sect_id <> 3 <br />and sect_id <> 9 and sect_id <> 1 and sect_id <> 13) ORDER BY
e.type,e.nom <p>Now, if I want that my request works well, I have to remove the order by statement. But, of course, it
isnot ordered any more. <p>So how can I translate this request to one which can work with an order by statement ?
<p>Thanks.<pre>--
 
Richard NAGY
Presenceweb</pre>  

В списке pgsql-sql по дате отправления:

Предыдущее
От: Kevin Way
Дата:
Сообщение: Re: trigger trouble -- procedure not found
Следующее
От: Bhuvan A
Дата:
Сообщение: ...