sql problem

Поиск
Список
Период
Сортировка
От Flavio Fonseca
Тема sql problem
Дата
Msg-id 200411051234.30961.ff@dr.ufu.br
обсуждение исходный текст
Ответы Re: sql problem
Список pgsql-sql
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


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

Предыдущее
От: "Igor Maciel Macaubas"
Дата:
Сообщение: Help in stored procedure
Следующее
От: "Michael L. Hostbaek"
Дата:
Сообщение: Re: Group by and aggregates