Re: More about "CREATE TABLE" from inside a function/trigger...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dominic J(dot) Eidson" <sauron(at)the-infinite(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: More about "CREATE TABLE" from inside a function/trigger...
Date: 2000-08-31 05:23:55
Message-ID: 584.967699435@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I believe you could do CREATE TABLE from inside a pltcl or plperl
function today. plpgsql won't work because it tries to cache query
plans for repeated execution --- which essentially means that you
can only substitute parameters for data values, not for table names
or field names or other structural aspects of a query. But the other
two just treat queries as dynamically-generated strings, so you can
do anything you want in those languages. (At a performance price,
of course: no caching. There ain't no such thing as a free lunch.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-08-31 05:32:51 Re: Patch for TNS services
Previous Message Tom Lane 2000-08-31 05:14:55 Re: Patch for TNS services