Rule to fill in value on column on insert

Поиск
Список
Период
Сортировка
От Bradley Kieser
Тема Rule to fill in value on column on insert
Дата
Msg-id 3D046290.2060906@kieser.net
обсуждение исходный текст
Ответы Re: Rule to fill in value on column on insert  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Re: Rule to fill in value on column on insert  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
How do I create a rule that will set a column to a particular value upon 
insert? It's for use within an audit trail and we want to prevent any 
possibility of some rogue code setting it to an incorrect value (it's a 
time stamp) so we don't want to use default values.

In general, though, it would be handy to know how to do this as there 
are many uses for it!

Thanks,

Brad



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

Предыдущее
От: Joseph Syjuco
Дата:
Сообщение: Re: arrays as pgsql function parameters
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Rule to fill in value on column on insert