Anyway, I'm not writing just to point out that we have a previously
undocumented feature.  I notice that the section on porting from Oracle
PL/SQL mentions

  You cannot use parameter names that are the same as columns that are
  referenced in the function. Oracle allows you to do this if you qualify
  the parameter name using function_name.parameter_name.

it's not supported yet?

postgres=# create or replace function foox(a integer) returns integer
as $$ begin return foox.a; end $$ language plpgsql;

ostgres=# select foox(10);
ERROR:  missing FROM-clause entry for table "foox"
LINE 1: SELECT  foox.a
QUERY:  SELECT  foox.a
CONTEXT:  PL/pgSQL function "foox" line 1 at return

I am sure, It's good idea - and I thing SQL/PSM specifies it too.

Pavel Stehule

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not

Reply via email to