Re: [HACKERS] Adding "eval" to pl?

From: wieck(at)debis(dot)com (Jan Wieck)
To: a(dot)joubert(at)albourne(dot)com (Adriaan Joubert)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Adding "eval" to pl?
Date: 1999-06-28 17:02:06
Message-ID: m10yenG-0003ktC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> 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(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-06-28 17:26:52 Re: Perl library (was Building Postgres)
Previous Message Oliver Elphick 1999-06-28 16:20:54 Re: [HACKERS] Perl library (was Building Postgres)