On Fri, Aug 04, 2006 at 06:16:41AM +0300, gustavo halperin wrote:
> *OK thank you, you right, but after write "public" I receive again an
> empty row, Why??.
[...]
> mydb=> CREATE OR REPLACE FUNCTION f_describe_tables (v_tbl_scm text,
> v_tbl_name text,
> mydb(> OUT text, OUT text) as
> mydb-> $$ SELECT c.column_name, c.data_type
> mydb$> FROM information_schema.columns c
> mydb$> WHERE c.table_schema = 'v_tbl_schm' AND c.table_name = 'v_tbl_name'
> mydb$> $$ LANGUAGE SQL;
You've hardcoded the strings 'v_tbl_schm' and 'v_tbl_name' instead
of using the function's arguments. I don't think SQL functions
support named arguments so you'll need to use $1 and $2. You'll
also need to use "RETURNS SETOF record" if you want to return more
than one row.
--
Michael Fuhr