data types in stored functions - Mailing list pgsql-novice

From Cima
Subject data types in stored functions
Date
Msg-id 016101c54139$5c453d30$f00110ac@doctorado1
Whole thread Raw
List pgsql-novice
hi,

im working in postgresql 8 and i have a few sotred functions that need
restructuring. one of the functions needs to return a set of values that i
gathered(inner joined) from other tables. what im not to sure is how do i
return these values in a data type that will allow me to manipulte them in
php. the values im returning are of type integer,text and oid and charater.
this is more or less what i have:

create function my_function (a int) returns ?sometype? as $$
declare
some_var ?sometype?;
begin
select into some_var  table1.col1,table1.col2, table2.col2 from
table1,table2
where table1.oid = table2.col1;
return some_var;
end;

language plpgsql;

what id like to know is what type of variable i could declare some_var as.

thanx.

P.D
in php im using pg_send_query and pg_get_result for this
stored function


pgsql-novice by date:

Previous
From: Andrew Hammond
Date:
Subject: Re: Problems on "copy" statement
Next
From: Lance Massey
Date:
Subject: query syntax question