hi,

I have a function as :-

create type cas as (o int,c int);

drop function f_c();

create or replace function f_chetan() returns cas as
'declare c record;
rec cas%rowtype;
begin
select contactid,telno into c from contact limit 1;
select c.contactid,c.telno into rec ;
return rec;
end;'language plpgsql;


select * from f_c();


If i give it this way, it gives this way the ip properly :-

o c
122 23



But,

if i change the statement in function from :-

select c.contactid,c.telno into rec ;

as :-

select c.* into rec ;

then it gives :-

ERROR: Relation "c" does not exist


AND,


if i change the statement in function from :-

select c.contactid,c.telno into rec ;

as :-

select c into rec ;

then it gives :-

ERROR: Attribute "c" not found


is there any way around this .

pls help.Thanks for any help in advance.