Re: List of error messages

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: List of error messages
Дата
Msg-id 200009130736.CAA01039@jupiter.jw.home
обсуждение исходный текст
Ответ на List of error messages  (Gisle Dankel <gmd@uk.research.att.com>)
Ответы Re: List of error messages  (Gisle Dankel <gmd@uk.research.att.com>)
Список pgsql-general
Gisle Dankel wrote:
>
> Hi,
> I couldn't find any explanations of error messages in the docs.
>
> I get this error message:
> ERROR:  triggered data change violation on relation "22"
>
> after doing
>
> DELETE FROM "22" WHERE id = 36;
>
> There's no foreign keys referring to this table, nor any triggers that I
> have explicitly defined.
> This occurs inside a transaction. When I tried it outside the transaction
> it worked fine!
>
> Anyone got any idea of what is going on?
> Do you need more information?

    Maybe  this  table  is  the  referring  one  in a foreign key
    relationship?

    Triggers/foreign keys are the only things that can cause  the
    above  error  message. It is a requirement of the SQL99 specs
    that one and the  same  row,  that  is  part  of  referential
    integrity  constraints  or  triggers, cannot be touched twice
    during a transaction.

    So if you did (in the same transaction)

        UPDATE "22" SET "22 A)" = 2.2 WHERE id = 36;

    then the above DELETE might be forbidden as of the specs.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



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

Предыдущее
От: Paul McGarry
Дата:
Сообщение: Replication of a portion of data to another database
Следующее
От: Steve Heaven
Дата:
Сообщение: migrating test db -> live db