Read-only attributes

Поиск
Список
Период
Сортировка
От Michael Klatt
Тема Read-only attributes
Дата
Msg-id NCBBLFLGLEIDHCJLONHNMEGJFHAA.mdklatt@ou.edu
обсуждение исходный текст
Ответы Re: Read-only attributes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
I have a table where one of the attributes is the time a row was inserted:
'updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP'.

Is there a way to define this attribute so that a user cannot override the
default value?  I have tried this constraint, but it fails for any INSERT:
'updated ... CHECK (updated = CURRENT_TIMESTAMP)'.

___________________________________
Michael Klatt

University of Oklahoma
Environmental Verification and Analysis Center
710 Asp Avenue, Suite 8
Norman, OK  73069

405.447.8412
405.447.8455  FAX
http://www.evac.ou.edu/

"I'm a great motivator.  Everyone says they have to work twice as hard when
I'm around."




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump - groups and users.
Следующее
От: Michael Klatt
Дата:
Сообщение: Ignore values on INSERT