Re: Read only column ? - Mailing list pgsql-general

From Gauthier, Dave
Subject Re: Read only column ?
Date
Msg-id 482E80323A35A54498B8B70FF2B87980043AD129AB@azsmsx504.amr.corp.intel.com
Whole thread Raw
In response to Re: Read only column ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Read only column ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Triggers,throw errors?  I didn't know they could do that.  Other than via "raise notice", how is this done?  Could I
capturesuch an error programatically (e.g. in perl/DBI)? 



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

"Gauthier, Dave" <dave.gauthier@intel.com> writes:
>> .. 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. 

Well, you could have the triggers throw errors instead of being silent
about it.

            regards, tom lane

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Read only column ?
Next
From: "Gauthier, Dave"
Date:
Subject: Re: Read only column ?