>
> Hi,
>
> I have a problem where an action in a PL function depends on a table
> which is determined at run-time. So the steps are the following:
>
> 1. trigger gets passed a row
> 2. table name is looked up in a reference table, depending on a field in
> row
> 3. rows are deleted from the table
>
> In PL this cannot be done, as the execution plans are built once, so
> that the tables are fixed. The only PL solution I've come up with is a
> giant IF-THEN-ELSE statements, which is not terribly practical and hard
> to change.
This is entirely true for PL/pgSQL. But it isn't for PL/Tcl
where you have control over which statements get
prepared/saved and which not.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #