Re: ERROR: relation "ctr_alt" does not exist en una funcion

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Suso Lopez <jlcubas(at)terra(dot)es>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: ERROR: relation "ctr_alt" does not exist en una funcion
Date: 2009-08-19 16:55:37
Message-ID: 20090819165537.GC4894@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Suso Lopez escribió:
> Hola de nuevo, tengo una funcion :
> CREATE OR REPLACE FUNCTION prueba(n_cli integer, existe boolean)
> RETURNS boolean AS
> $BODY$
> DECLARE
> valores ctr_alt%ROWTYPE;
> BEGIN
> .....
>
> Me dice que no existe esa tabla, y la funcion esta creada para - en esa-
> tabla.

Acá funciona. Muestra el mensaje de error completo por favor.

alvherre=# create table ctr_alt (a int, b text);
CREATE TABLE
alvherre=# create or replace function prueba(a int, b boolean) returns boolean as $$ declare col ctr_alt%rowtype; begin return true; end; $$ language plpgsql;
CREATE FUNCTION
alvherre=# select prueba (1, 't');
prueba
--------
t
(1 fila)

--
Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end." (2nd Commandment for C programmers)

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Miguel Beltran R. 2009-08-19 17:34:34 Re: [pgsql-es-ayuda] ¿Existe una función en JavaScript para poder saber el Número de parametros recibidos en una función creada por el usuario?
Previous Message Alvaro Herrera 2009-08-19 16:01:23 Re: Activación de Triggers