Re: Trigger Update Issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trigger Update Issue
Дата
Msg-id 7944.1078503060@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trigger Update Issue  ("beer" <beer@cmu.edu>)
Список pgsql-general
"beer" <beer@cmu.edu> writes:
> I'm running 7.3.4-1 on a RH9 box.  I'm having a problem with a trigger
> that seems to execute without actually performing the update that it
> should.  The update returns true everytime however if it is the first time
> that the trigger executes on a given row, the column is not updated.  The
> column is updated correctly on subsequent calls.

I couldn't reproduce this.  I created the tables and trigger and then
did:

regression=# insert into tabA values('id1','col1', 2, 32);
INSERT 154119 1
regression=# insert into tabB values(1,'id1','col1','col2');
INSERT 154120 1
regression=# select * from tabA;
                id                |                  acol1                   | acol2 | acol3
----------------------------------+------------------------------------------+-------+-------
 id1                              | col1                                     |     2 |    33
(1 row)

regression=# insert into tabB values(2,'id1','col1','col2');
INSERT 154121 1
regression=# select * from tabA;
                id                |                  acol1                   | acol2 | acol3
----------------------------------+------------------------------------------+-------+-------
 id1                              | col1                                     |     2 |    34
(1 row)

It looks fine to me ... what are you doing differently?

            regards, tom lane

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

Предыдущее
От: phil campaigne
Дата:
Сообщение: Setting up Postgresql on Linux
Следующее
От: "Chris Boget"
Дата:
Сообщение: Re: REFERENCES error message complaint, suggestion