Re: plpgsql
От | Alvaro Herrera |
---|---|
Тема | Re: plpgsql |
Дата | |
Msg-id | 20031019212556.GB32744@dcc.uchile.cl обсуждение исходный текст |
Ответ на | plpgsql (Martin Marques <martin@bugs.unl.edu.ar>) |
Ответы |
Re: plpgsql
|
Список | pgsql-general |
On Sat, Oct 18, 2003 at 06:48:10PM -0300, Martin Marques wrote: > We are trying to make some things work with plpgsql. The problem is that I > built several functions that call one another, and I thought that the way of > calling it was just making the assign: > > var:=func1(arg1,arg2); Have you tried plpgsql's SELECT INTO ? FWIW this works for me: alvh=> create function a() returns text as 'select ''foo''::text' language sql; CREATE FUNCTION alvh=> create or replace function b() returns text as 'declare b text; begin select into b a(); return b; end;' languageplpgsql; CREATE FUNCTION alvh=> select b(); b ----- foo (1 registro) alvh=> create or replace function b() returns text as 'declare b text; begin b := a(); return b; end;' language plpgsql; CREATE FUNCTION alvh=> select b(); b ----- foo (1 registro) -- Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) "Por suerte hoy explotó el califont porque si no me habría muerto de aburrido" (Papelucho)
В списке pgsql-general по дате отправления: