Re: [GENERAL] help with plpgsql function called by trigger

2005-03-17 Thread Heather Johnson
Thank you! That *is* nicer. And thanks to Michael Fuhr too for his reference to the appropriate docs and suggestions. Between your two responses, I have a much better sense of how to go about this and where to look for extra help. Heather Alban Hertroys wrote: Heather Johnson wrote: Hello-- I n

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-17 Thread Alban Hertroys
Heather Johnson wrote: Hello-- I need to make sure that every time a row is inserted into a table called "users" rows are automatically inserted into two other tables: "join_bd" and "behavior_demographics". The inserts on join_bd and behavior_demographics need to create rows that are keyed to th

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-16 Thread Michael Fuhr
On Wed, Mar 16, 2005 at 02:34:48PM -0500, Heather Johnson wrote: > CREATE FUNCTION insert_bd_join_bd (integer) RETURNS opaque AS ' What version of PostgreSQL are you using? The "opaque" type has been deprecated since 7.3; recent versions should use "trigger". And trigger functions aren't declare

[GENERAL] help with plpgsql function called by trigger

2005-03-16 Thread Heather Johnson
Hello-- I need to make sure that every time a row is inserted into a table called "users" rows are automatically inserted into two other tables: "join_bd" and "behavior_demographics". The inserts on join_bd and behavior_demographics need to create rows that are keyed to the users table with an