From: | Adriaan Joubert <a(dot)joubert(at)albourne(dot)com> |
---|---|
To: | Postgres-General <pgsql-general(at)postgreSQL(dot)org> |
Subject: | PL problem |
Date: | 1999-06-14 07:36:47 |
Message-ID: | 3764B10F.40EFD12C@albourne.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Another problem with PL (I got no replies to the bug report last Friday
about problems with PL when using FOR UPDATE OF ..).
I think the following may be impossible fomr PL, but I store information
in different tables depending on the type of job that is being handled.
On reset I want to clear these tables, so i store the names of the
tables in a separate table and have a loop in PL
FOR table IN
SELECT jb_name FROM jobparams p, jobs j
WHERE jb_type = type AND j.job = tsk.job
LOOP
DELETE FROM table.jb_name
WHERE job = tsk.job AND id = vid
AND date >= tsk.fromdate AND date <= tsk.uptodate;
END LOOP;
and PL does not like a variable in the table name.
ERROR: parser: parse error at or near "$1"
I guess this may have to do with the way the query plan is stored, so
that this may just be impossible to fix. Could somebody who knows how PL
works please confirm whether I'm asking something impossible here?
Adriaan
From | Date | Subject | |
---|---|---|---|
Next Message | Herouth Maoz | 1999-06-14 08:38:19 | Re: [GENERAL] PL problem |
Previous Message | cfogarty | 1999-06-14 00:19:47 | Re: pgsql-general-digest V1 #351 |