Re: %rowtype - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: %rowtype
Date
Msg-id cca2ac7b8f6f19c5334d6aa803be33e1065bd7be.camel@cybertec.at
Whole thread Raw
In response to %rowtype  (Pepe TD Vo <pepevo@yahoo.com>)
Responses Re: %rowtype  (Pepe TD Vo <pepevo@yahoo.com>)
List pgsql-admin
Pepe TD Vo wrote:
> Would you please tell me what I did wrong here?
> I couldn't find the rowtype eliminate with a cursor in multi-tables selected.
> 
> 
> CREATE OR REPLACE FUNCTION "CIDR_STAGING"."PR_MIG_STG_I864" ( v_Ret OUT int ) RETURNS integer as $$
>  declare 
>    c1 cursor is
>       SELECT ...;
>    rec1            c1%rowtype;

There is a type associated with each view and table, but not with a cursor.

You need to use the generic type "record" for "rec1".

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



pgsql-admin by date:

Previous
From: Pepe TD Vo
Date:
Subject: %rowtype
Next
From: Pepe TD Vo
Date:
Subject: Re: %rowtype