Search Postgresql Archives

Re: NEW variable values in trigger functions

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

 



"Ken Winter" <ken@xxxxxxxxxxx> writes:
> 1. What is the value of the NEW variable for a column that is not mentioned
> in an UPDATE statement?  Is it NULL?  If not NULL, what?

No, it's whatever value is going to be assigned to the new row (which in
this particular case would be the same as the OLD value).

> 2. Same questions re the value of a NEW variable that is not assigned a
> value in an INSERT statement.  

Same answer: whatever value is due to go into the row (in this case,
whatever the default is for the column).

> 3. If an UPDATE query set a column to DEFAULT, what value does a trigger
> function see for the column's NEW variable?

Same answer.

			regards, tom lane


[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