Search Postgresql Archives

Re: Question on trigger data visibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Terry Lee Tucker <terry@xxxxxxxxxxxxxxx> writes:
> On Monday, August 30, 2010 07:20:14 Maurice Gittens wrote:
>> So, it seems that even though my trigger is defined as AFTER INSERT
>> FOR EACH STATEMENT, the inserted row
>> does not appear to be included in the join.
>> 
>> So, now to my question: Should, as a matter of principle, statement
>> level triggers not "see" rows recently inserted into the tablex?

> They do "see" those rows. Are you sure that the inner join with tab_Y is not 
> causing the problem? Just a guess...

It also seems worth pointing out that this trigger would hardly ensure
referential integrity.  As quoted, it would succeed so long as there is
at least one tablex row that is properly referencing some tablez row.
Surely you want to require that they *all* do.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux