Re: [SQL] Trigger functions with dynamic SQL

2004-07-26 Thread Andreas Haumer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! I have solved the problem! Tom Lane wrote: > Andreas Haumer <[EMAIL PROTECTED]> writes: > >>I just can't figure out where and how many quotation marks >>I have to place in my function. > > > It's messy all right. The "dollar quoting" feature in

Re: [SQL] Trigger functions with dynamic SQL

2004-07-24 Thread Tom Lane
Andreas Haumer <[EMAIL PROTECTED]> writes: > I just can't figure out where and how many quotation marks > I have to place in my function. It's messy all right. The "dollar quoting" feature in 7.5 should make it a lot less painful, since you can stop having to double and re-double quote marks. If

Re: [SQL] Trigger functions with dynamic SQL

2004-07-24 Thread Andreas Haumer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Many thanks for your reply! Tom Lane wrote: > Andreas Haumer <[EMAIL PROTECTED]> writes: > >>It seems I would have to use EXECUTE on dynamically constructed >>PL/PGSQL statements in order to have my trigger function recognize >>the parameters giv

Re: [SQL] Trigger functions with dynamic SQL

2004-07-24 Thread Tom Lane
Andreas Haumer <[EMAIL PROTECTED]> writes: > It seems I would have to use EXECUTE on dynamically constructed > PL/PGSQL statements in order to have my trigger function recognize > the parameters given to the trigger in TG_ARGV[] Yup, that's exactly right. plpgsql isn't designed for this; it's des

[SQL] Trigger functions with dynamic SQL

2004-07-24 Thread Andreas Haumer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! I could use some help in writing PL/PGSQL trigger functions with dynamic SQL statements. The problem is not exactly an easy one but I hope it is of general interest to this list :-) I'm currently working on a database with several temporal tables