"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
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;