Read-only attributes

Поиск
Список
Период
Сортировка
Искать
От
Michael Klatt
Тема
Read-only attributes
Дата
Msg-id
NCBBLFLGLEIDHCJLONHNMEGJFHAA.mdklatt@ou.edu
Список
Дерево обсуждения
Read-only attributes Michael Klatt <mdklatt@ou.edu>
Re: Read-only attributes Tom Lane <tgl@sss.pgh.pa.us>
7.2 upgrade Tuna Chatterjee <tchatter@alert.infoplease.com>
Re: 7.2 upgrade "Josh Berkus" <josh@agliodbs.com>
Re: 7.2 upgrade Tuna Chatterjee <tchatter@alert.infoplease.com>
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
Дата:
От: Michael Klatt
Дата:
Сообщение: Ignore values on INSERT
FAQ