On Jan 18, 2007, at 2:38 AM, Jan Meyland Andersen wrote:
But the problem here is that the where-clause depends on the
relkind. That
is why I'm trying to solve the problem this way.
I think that clause can be written as a subselect and added to the
expression. Or just make that a separate
> There are two forms to iterate over the query:
>
> 1. FOR target IN query LOOP
> 2. FOR target IN EXECUTE text_expression LOOP
Thanks for your answer.
> My suggestion is to eliminate the string you created (_WHERECLAUSE) and
> add the proper conditions to the query expression you already have.
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
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.
DECLARE
_relkind char;
_RES "EMS"."KeySet";
_WHERECLAUSE text;
BEGIN
SELE