data types in stored functions

Поиск
Список
Период
Сортировка
От Cima
Тема data types in stored functions
Дата
Msg-id 016101c54139$5c453d30$f00110ac@doctorado1
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Andrew Hammond
Дата:
Сообщение: Re: Problems on "copy" statement
Следующее
От: Lance Massey
Дата:
Сообщение: query syntax question