Re: [GENERAL] I'm lost :-( with FOR...IN

2006-11-07 Thread Alain Roger
Ok guys...i found the stupid problem :-((everytime that i call my stored procedure, i did like that : select sp_u_001('action'); instead of  select * from sp_u_001('action');thanks to all of you for your tips, they helped me to understand composite. one last question : how can i test if myrec compo

Re: [GENERAL] I'm lost :-( with FOR...IN

2006-11-07 Thread Alain Roger
i already tried this possibility and i've got :ERROR:  set-valued function called in context that cannot accept a setCONTEXT:  PL/pgSQL function "sp_u_001" line 26 at return next:-( On 11/7/06, Stephan Szabo <[EMAIL PROTECTED]> wrote: On Tue, 7 Nov 2006, Alain Roger wrote:> Hi,>> I' still with my s

Re: [GENERAL] I'm lost :-( with FOR...IN

2006-11-07 Thread Stephan Szabo
On Tue, 7 Nov 2006, Alain Roger wrote: > Hi, > > I' still with my stored procedure : > > -- Function: SP_U_001(typeofarticle varchar) > > -- DROP FUNCTION SP_U_001(typeofarticle varchar); > > CREATE OR REPLACE FUNCTION SP_U_001(IN typeofarticles VARCHAR) > RETURNS SETOF active_articles AS > $BO

Re: [GENERAL] I'm lost :-( with FOR...IN

2006-11-07 Thread Alain Roger
If i do what you wrote, i can not create the function into my DB.error on 1st ( On 11/7/06, Merlin Moncure < [EMAIL PROTECTED]> wrote:On 11/7/06, Alain Roger < [EMAIL PROTECTED]> wrote:> Hi,>> I' still with my stored procedure :>> -- Function: SP_U_001(typeofarticle varchar)>> -- DROP FUNCTION SP_U

Re: [GENERAL] I'm lost :-( with FOR...IN

2006-11-07 Thread Merlin Moncure
On 11/7/06, Alain Roger <[EMAIL PROTECTED]> wrote: Hi, I' still with my stored procedure : -- Function: SP_U_001(typeofarticle varchar) -- DROP FUNCTION SP_U_001(typeofarticle varchar); CREATE OR REPLACE FUNCTION SP_U_001(IN typeofarticles VARCHAR) RETURNS SETOF active_articles AS $BODY$ DE

[GENERAL] I'm lost :-( with FOR...IN

2006-11-07 Thread Alain Roger
Hi,I' still with my stored procedure :-- Function: SP_U_001(typeofarticle varchar)-- DROP FUNCTION SP_U_001(typeofarticle varchar);CREATE OR REPLACE FUNCTION SP_U_001(IN typeofarticles VARCHAR)   RETURNS SETOF active_articles AS$BODY$DECLARE    myrec RECORD;    res active_articles;/