Tom Lane wrote:
[EMAIL PROTECTED] writes:
i'd like to write an rule which fills out some empty attrs on insert (w/ data from other given attrs).

You'd be better off doing this with a BEFORE INSERT trigger.

The only way to do it with rules would be to create a view over the basetable, create an insert rule over the view and then have the application doing the insert into the view instead. So "better" could be considered an understatement :-)



Jan


--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== [EMAIL PROTECTED] #


---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to