From: | "Raul Andres Duque" <ra_duque(at)yahoo(dot)com(dot)mx> |
---|---|
To: | <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Type mismatch en función SQL |
Date: | 2009-04-24 19:16:01 |
Message-ID: | 71084B7F08DD4EAC841BC512A840A185@amadeus.net.co |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Cordial saludo compañeros:
Estoy intentando definir la siguiente función y no entiendo porque me genera error de tipos si la tengo son SETOF RECORD ...
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"
Gracias.
Atentamente,
RAUL DUQUE
Bogotá, Colombia
From | Date | Subject | |
---|---|---|---|
Next Message | Virginia | 2009-04-24 19:55:22 | Re: cifrado de campos en postgres? |
Previous Message | Rodolfo Vegas | 2009-04-24 16:39:30 | Ayuda sobre el except!!!! |