> actually - function name should be used as label now. This code is working:

Not helpful for me. The most typical conflict I have is actually the
OUT parameter and table name, not a column of the table.

Really don't want to prefix all tables with a hardcoded schema or do
variable substitution for loading the document.

Not fond of prefixing with function name either as a) many of my
functions have very long names and b) they change names occasionally,
particularly during development.

A short prefix like "out" would be useful. I would immediately start
prefixing all uses.

rbt=# begin;
BEGIN
rbt=# create table b (col integer);
CREATE TABLE
rbt=# insert into b values (2);
INSERT 0 1
rbt=# create or replace function fx2(a integer, out b integer) as $$
rbt$# begin
rbt$#   SELECT col
rbt$#     INTO fx2.b
rbt$#     FROM b;
rbt$#
rbt$#   return;
rbt$# end; $$ language plpgsql;
ERROR:  syntax error at or near "$1"
LINE 1: SELECT col FROM  $1
                         ^
QUERY:  SELECT col FROM  $1
CONTEXT:  SQL statement in PL/PgSQL function "fx2" near line 4
rbt=#

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to