From: | John DeSoi <desoi(at)pgedit(dot)com> |
---|---|
To: | Jan Meyland Andersen <jma(at)agile(dot)dk> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Some help with functions-syntax |
Date: | 2007-01-18 00:50:40 |
Message-ID: | 2AFADCD2-C72D-40FB-8B8E-D6FD023F2148@pgedit.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Take a look at the documentation and examples again:
http://www.postgresql.org/docs/8.2/interactive/plpgsql-control-
structures.html#PLPGSQL-RECORDS-ITERATING
There are two forms to iterate over the query:
1. FOR target IN query LOOP
2. FOR target IN EXECUTE text_expression LOOP
In your code you have mixed the two together. You appear to be trying
to concatenate a string on to the end of a query expression. My
suggestion is to eliminate the string you created (_WHERECLAUSE) and
add the proper conditions to the query expression you already have.
On Jan 17, 2007, at 5:33 PM, Jan Meyland Andersen wrote:
> I have some problem with writing a function.
>
> I have made this function which I can't get it to work.
>
> This is probaly a triviel question but i'm new to plsql, so this is a
> showstopper for me.
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Meyland Andersen | 2007-01-18 07:38:56 | Re: Some help with functions-syntax |
Previous Message | Jan Meyland Andersen | 2007-01-17 22:33:19 | Some help with functions-syntax |