Re: Read only column ?

Поиск
Список
Период
Сортировка
От Gauthier, Dave
Тема Re: Read only column ?
Дата
Msg-id 482E80323A35A54498B8B70FF2B87980043AD129AA@azsmsx504.amr.corp.intel.com
обсуждение исходный текст
Ответ на Re: Read only column ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Read only column ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
>>.. although, if you have triggers forcibly setting the columns, it
>>hardly matters what the users try to put into them, no?

Ummmm..... Wellll....  I guess you have a point there :-)

Still, it would be nicer for the DB to tell them "DON'T TOUCH THAT" as opposed to a trigger silently overriding
whateverthey may have thought they changed. 



-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Saturday, January 16, 2010 9:00 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Read only column ?

"Gauthier, Dave" <dave.gauthier@intel.com> writes:
> Is there a way to set a column to be read only?

As of 8.4 you could revoke insert/update permissions column-by-column ...

> I have a table with several columns with values that are determined by triggers.  I want users to be able to view,
butnever edit them. 

... although, if you have triggers forcibly setting the columns, it
hardly matters what the users try to put into them, no?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Read only column ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Read only column ?