From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
---|---|
To: | Alain Roger <raf(dot)news(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: FOR ... IN |
Date: | 2006-11-07 09:05:08 |
Message-ID: | 45504C44.9000309@magproductions.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alain Roger wrote:
> Hi,
>
> Before (in version 8.0.1), i did the following thing and it was working
> well...now (in version 8.1.4) it seems that it does not work anymore...
> problem is with FOR rec IN loop...
Could you elaborate on "does not work"?
> So how can i tell "FOR all RECORDS from select * from articles,
> articletypes, department where ..." LOOP ... ?
Well, seeing as this is apparently the same function you posted about
earlier, I suspect it's the same problem with the DECLARE block.
I rather doubt that FOR .. IN broke between releases.
> CREATE OR REPLACE FUNCTION "public"."SP_U_001" ("TypeOfArticle" varchar)
> RETURNS SETOF "public"."active_articles" AS
> $body$
> DECLARE
> TypeArt VARCHAR := $1;
> rec RECORD;
> res active_articles;
> /**************************************/
> BEGIN
--
Alban Hertroys
alban(at)magproductions(dot)nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
From | Date | Subject | |
---|---|---|---|
Next Message | Desmond Coughlan | 2006-11-07 09:13:22 | RE : Re: first steps in PhP and PostgreSQL |
Previous Message | Alban Hertroys | 2006-11-07 08:59:17 | Re: stored procedure / Function |