[Pgsql-ayuda] Cual es el error

From: "Edwin Quijada" <listas_quijada(at)hotmail(dot)com>
To: "Pgsql" <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: [Pgsql-ayuda] Cual es el error
Date: 2003-09-03 07:36:28
Message-ID: BAY1-DAV73rRjbDt3Hv000172c4@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Tengo un error un poco extrano en esta funcion: Me da este error

WARNING: Error occurred while executing PL/pgSQL function cortar_char
WARNING: line 8 at select into variables

ERROR: Unable to identify an operator '=' for types 'name' and 'character'
You will have to retype this query using an explicit cast

--Este es el codigo de la funcion--
CREATE FUNCTION cortar_char(bpchar,bpchar,bpchar) RETURNS int4 AS '
DECLARE
tabla ALIAS FOR $1;
campo ALIAS FOR $2;
dato ALIAS FOR $3;
len int;
reg record;
BEGIN
select into reg b.atttypmod
from pg_class a, pg_attribute b, pg_type c
where a.relname = tabla
and b.attrelid = a.relfilenode
and b.attname = campo
and b.attnum >0
and b.atttypid = c.oid;
len:=reg.lon;
return len;
END;'
LANGUAGE 'plpgsql';

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message xxavi 2003-09-03 09:44:20 [Pgsql-ayuda] Migracion de una base de datos cualquiera echa con PostgreSQL
Previous Message Edwin Quijada 2003-09-03 05:01:22 Re: [Pgsql-ayuda] Longitud de campos string