[GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Christopher BROWN
Hello, I'm new to this list but have been using PostgreSQL for a moment. I've encountered an error using PostgreSQL 9.4.4 which can be reproduced using the SQL below. The trigger "init_store_ldap_profiles_trigger" fails if the function "init_store_ldap_profiles()" is written as below. If I rewr

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Christopher BROWN
INSERT INTO application.store_ldap_profile (ref_store, > ref_ldap_department, ref_ldap_title, access_mode) VALUES (NEW.id, > r.ref_ldap_department, r.ref_ldap_title, r.access_mode); > >END LOOP; > >RETURN NEW; > > END; $$ > > LANGUAGE plpgsql VOLATILE; &g

Re: [GENERAL] Strange TRIGGER failure with FOR ... IN ... LOOP ... INSERT

2015-08-27 Thread Christopher BROWN
that returns instances of any given %ROWTYPE in the future. Thanks again. Christopher On 27 August 2015 at 15:25, Adrian Klaver wrote: > On 08/27/2015 04:49 AM, Christopher BROWN wrote: > >> Hello, >> >> I'm new to this list but have been using PostgreSQL for a moment