pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Flavio Fonseca <ff@dr.ufu.br>
To: pgsql-php@postgresql.org
Subject: sql problem with php
Date: Fri, 5 Nov 2004 12:33:09 -0200
Message-ID: <200411051233.10080.ff@dr.ufu.br> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <200411051233.10080.ff@dr.ufu.br>
Permalink:  ../200411051233.10080.ff@dr.ufu.br/
Also on:    postgresql.org/message-id/200411051233.10080.ff@dr.ufu.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: ff@dr.ufu.br
  Subject: Re: sql problem with php
  In-Reply-To: <200411051233.10080.ff@dr.ufu.br>
  References: <200411051233.10080.ff@dr.ufu.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox