Re: [GENERAL] dynamic SQL - variable substitution in plpgsql

2006-12-07 Thread Alban Hertroys
km wrote: > Hi all, > > i could not do variable substitution in plpgsql procedure. > The variable names are taken as it is but not substituted in the SQL query. > what could be the problem ? Does this example even compile? I doubt that... > code looks like this: > --

Re: [GENERAL] dynamic SQL - variable substitution in plpgsql

2006-12-06 Thread Tony Caduto
km wrote: Hi all, i could not do variable substitution in plpgsql procedure. The variable names are taken as it is but not substituted in the SQL query. what could be the problem ? FOR result IN "SELECT x,y,z FROM mydata WHERE x = a AND y < b AND z > c" LOOP RETURN NEXT result;

[GENERAL] dynamic SQL - variable substitution in plpgsql

2006-12-06 Thread km
Hi all, i could not do variable substitution in plpgsql procedure. The variable names are taken as it is but not substituted in the SQL query. what could be the problem ? code looks like this: -- CREATE OR REPLACE FUNCTION test(a te