From: | "Jaime Casanova" <systemguards(at)gmail(dot)com> |
---|---|
To: | "Jorge Martinez" <jlm4303(at)yahoo(dot)com(dot)ar> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Parametros en Funciones |
Date: | 2006-06-30 04:24:20 |
Message-ID: | c2d9e70e0606292124v79ea28f5u30b7c2a9b3c50b1f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
>
> CREATE OR REPLACE FUNCTION tomodat("char")
> RETURNS bool AS
> $BODY$
> DECLARE
> pp_lug ALIAS FOR $1;
> BEGIN
> delete from registem;
> copy registem from pp_lug delimiters '|';
> return true;
> END;
> $BODY$
> LANGUAGE 'plpgsql' VOLATILE;
> ALTER FUNCTION tomorel("char") OWNER TO postgres;
>
Adicionalmente a lo que te dijo Alvaro... si quieres enviar como
parametro el nombre de la tabla el tipo "char" (char entre comillas)
no es tu mejor opcion, es un postgres-ismo que sirve para guardar un
solo caracter y ocupa un solo byte mejor deberias pasar tipo text
--
Atentamente,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook
From | Date | Subject | |
---|---|---|---|
Next Message | Yeisel Jose Rosales Avila | 2006-06-30 12:24:09 | lista |
Previous Message | Jaime Casanova | 2006-06-30 03:22:28 | Re: Conectar DSN en windowsXP via ODBC a servidor PostgreSQL en GNU/Linux |