X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6031A3A3C7F for ; Fri, 5 Nov 2004 14:34:35 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28028-08 for ; Fri, 5 Nov 2004 14:34:30 +0000 (GMT) Received: from doodle.dr.ufu.br (doodle.dr.ufu.br [200.19.146.202]) by svr1.postgresql.org (Postfix) with ESMTP id 5A96B3A3B4C for ; Fri, 5 Nov 2004 14:34:31 +0000 (GMT) Received: (qmail-ldap/ctrl 22613 invoked by uid 1007); 5 Nov 2004 14:34:31 -0000 Received: from 200.19.147.131 by doodle (envelope-from , uid 1001) with qmail-scanner-1.23 (clamdscan: 0.75. Clear:RC:1(200.19.147.131):. Processed in 0.019836 secs); 05 Nov 2004 14:34:31 -0000 Received: from ff.dr.ufu.br (ff@dr.ufu.br@[200.19.147.131]) (envelope-sender ) by doodle.dr.ufu.br (qmail-ldap-1.03) with SMTP for ; 5 Nov 2004 14:34:31 -0000 From: Flavio Fonseca Organization: Universidade Federal de Uberlandia To: pgsql-sql@postgresql.org Subject: sql problem Date: Fri, 5 Nov 2004 12:34:30 -0200 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411051234.30961.ff@dr.ufu.br> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/43 X-Sequence-Number: 19362 Hi, I am having a problem with a system I developed using php with postgres. Take a look at this: Welcome to psql 7.3.2, the PostgreSQL interactive terminal. NetAdmin=# delete from operador where oplogin = 'ff'; ERROR: fk_historicosessao_operador referential integrity violation - key in operador still referenced from historicosessao and then, this: Welcome to psql 7.4.2, the PostgreSQL interactive terminal. NetAdmin=# delete from operador where oplogin = 'ff'; ERROR: update or delete on "operador" violates foreign key constraint "fk_historicosessao_operador" on "historicosessao" I am not able to get a error_number in pgsql errors, only the error message. So when I used pgsql 7.3 a used the string "referential integrity violation" to detect this error, but on version 7.4 of pgsql this string was replaced with "violates foreign key constraint" . Anyone has a definitive solution on this or the way is to wait and change all my code on future releases of pgsql? Thank you all for the attention. -- Att. Flavio Fonseca Administrador de Redes Divisao de Redes Universidade Federal de Uberlandia