Re: Bug in PostGreSQL 8.2

Поиск
Список
Период
Сортировка
От Thomas H.
Тема Re: Bug in PostGreSQL 8.2
Дата
Msg-id 04c501c71954$a56b2c00$0201a8c0@iwing
обсуждение исходный текст
Ответ на Bug in PostGreSQL 8.2  (Hubert FONGARNAND <informatique.internet@fiducial.fr>)
Список pgsql-hackers

for what its worth: i have just encountered the same problem with a different query:
 
-------------------
UPDATE logs.pagehits SET page = lower(page)
WHERE page IN
(
    SELECT DISTINCT ON (lower(page)) page
    FROM logs.pagehits
    WHERE lower(page) <> page AND NOT lower(page) IN (SELECT page FROM logs.pagehits WHERE page = lower(page))
)
-------------------
 
this will result in:
ERROR:  failed to find unique expression in subplan tlist
 
it can be easily "fixed" by doing an additional subselect:
 
-------------------
UPDATE logs.pagehits SET page = lower(page)
WHERE page IN
(
    SELECT page FROM
    (
        SELECT DISTINCT ON (lower(page)) page
        FROM logs.pagehits
        WHERE lower(page) <> page AND NOT lower(page) IN (SELECT page FROM logs.pagehits WHERE page = lower(page))
        AS upperpages
    )
)
-------------------
 
"page" field is a varchar(255)
 
(the query finds those page hits entries that are non-lowercase and for which no lowercase version exists. page ressembles the url. if more than one way of writing exists, for example "/Faq/" and "/FAQ", only one is changed to comply with the primary key)
 
- thomas
 
----- Original Message -----
Sent: Wednesday, December 06, 2006 5:15 PM
Subject: Re: [HACKERS] Bug in PostGreSQL 8.2

Complete example :

./configure  --prefix=/opt/pg82--with-perl --with-python --with-tcl --enable-nls
make
make install

/opt/pg82/bin/initdb -D /var/lib/postgresql/data82/ --locale=fr_FR.utf8 -W
/opt/pg82/bin/pg_ctl -D /var/lib/postgresql/data82 -l journaltrace start

and with pgadmin 3

CREATE TABLE node
(
  node_id character varying(36) NOT NULL ,
  node_trash integer NOT NULL DEFAULT 0,
  CONSTRAINT pk_node PRIMARY KEY (node_id)
) 
WITH OIDS;

select count(*) 
from NODE  
where NODE_ID 
in (select NODE_ID from NODE where NODE_TRASH=0  limit 1  offset 0)

and

ERREUR: failed to find unique expression in subplan tlist
État SQL :XX000

Le mercredi 06 décembre 2006 à 14:51 +0100, Hubert FONGARNAND a écrit :
I've seen this morning that PostGreSQL 8.2 was released!

I've updated my dev. server, and : this SQLstatement fail :

select count(*) 
from NODE  
where NODE_ID 
in (select NODE_ID from NODE where NODE_TRASH=0  limit 1  offset 0)

with :

ERREUR: failed to find unique expression in subplan tlist
État SQL :XX000

I downgrade to PostGreSQL 8.1.5...

Thanks to fix this!

_______________________________________________
Ce message et les ventuels documents joints peuvent contenir des informations confidentielles.
Au cas o挰 il ne vous serait pas destin, nous vous remercions de bien vouloir le supprimer et en aviser imm柩diatement l'expditeur. Toute utilisation de ce message non conforme † sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'tant pas s整curises, l'intउgrit de ce message n'est pas assur獡e et la socitて mettrice ne peut 汢tre tenue pour responsable de son contenu.
_______________________________________________
Ce message et les �ventuels documents joints peuvent contenir des informations confidentielles.
Au cas o� il ne vous serait pas destin�, nous vous remercions de bien vouloir le supprimer et en aviser imm�diatement l'exp�diteur. Toute utilisation de ce message non conforme � sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'�tant pas s�curis�es, l'int�grit� de ce message n'est pas assur�e et la soci�t� �mettrice ne peut �tre tenue pour responsable de son contenu.

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

Предыдущее
От: Hubert FONGARNAND
Дата:
Сообщение: Re: Bug in PostGreSQL 8.2
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: SQL/PSM implemenation for PostgreSQL (roadmap)