Search Postgresql Archives

PLPGSQL function schema or table parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to pass a table name and/or schema name to a plpgsql function? How can I use them in the code? Which Types to use for each of the parameters?

E.g.

create or replace function MyTest (mySchema WhichType?, myTable WhichType?) returns integer as '

declare result integer;

Begin
     select id into result from mySchema.myTable where...
     return result;
End;
' language plpgsql;

Sorry if this issue has already been addressed before but I can't find any objective comments on this.
Thanks.
sidnei

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux