Re: [SQL] Local variable and column name conflict

2006-07-03 Thread Tom Lane
"Daniel Caune" <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION foo(i IN int) > RETURNS void > AS $$ > BEGIN > UPDATE bar > SET i = i; // column i = parameter i > END; > $$ LANGUAGE PLPGSQL; In SELECTs you can qualify the column, ie, bar.i vs i. That doesn't work for an UPDATE tar

[SQL] Local variable and column name conflict

2006-07-03 Thread Daniel Caune
Hi, Is there a way to specify a local variable/parameter within a query where a column has the same name than the local variable/parameter? Example: CREATE OR REPLACE FUNCTION foo(i IN int) RETURNS void AS $$ BEGIN UPDATE bar SET i = i; // column i = parameter i END; $$ LANGUAGE PLPGSQL;