From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Raul Andres Duque <ra_duque(at)yahoo(dot)com(dot)mx> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Type mismatch en función SQL |
Date: | 2009-04-24 21:50:56 |
Message-ID: | 20090424215056.GV10358@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Raul Andres Duque escribió:
> CREATE OR REPLACE FUNCTION columns(character varying, out character varying, out character varying, out character varying, out int, out int, out int, out character varying, out character varying, out character varying) RETURNS SETOF RECORD
> AS
> $BODY$
> SELECT table_schema,
> column_name,
> udt_name,
> character_maximum_length,
> numeric_precision,
> numeric_scale,
> is_nullable,
> data_type
> FROM information_schema.columns
> WHERE table_name = $1
> ORDER BY table_schema, ordinal_position
> $BODY$
> LANGUAGE 'sql' VOLATILE
>
> El error es:
>
> ERROR: return type mismatch in function declared to return record
> DETAIL: Final SELECT returns too few columns.
> CONTEXT: SQL function "columns"
Dice que el SELECT tiene muy pocas columnas comparado con la cantidad de
parametros OUT (efectivamente, tiene 8 y hay 9 parámetros OUT).
--
Alvaro Herrera Developer, http://www.PostgreSQL.org/
"El sabio habla porque tiene algo que decir;
el tonto, porque tiene que decir algo" (Platon).
From | Date | Subject | |
---|---|---|---|
Next Message | Marco Castillo | 2009-04-24 22:53:57 | Re: Oracle compra SUN |
Previous Message | Jaime Casanova | 2009-04-24 21:21:14 | Re: Oracle compra SUN |