Re: pg_class_aclcheck: relation [oid] not found...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_class_aclcheck: relation [oid] not found...
Date: 2003-05-27 01:39:20
Message-ID: 11644.1053999560@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sean Chittenden <sean(at)chittenden(dot)org> writes:
> CREATE FUNCTION s.f()
> RETURNS BIGINT
> EXTERNAL SECURITY DEFINER
> AS '
> BEGIN
> EXECUTE ''CREATE LOCAL TEMP TABLE t (
> a TEXT NOT NULL,
> b TEXT
> ) WITHOUT OIDS ON COMMIT DROP;'';
> EXECUTE ''CREATE UNIQUE INDEX t_key_udx ON t(a);'';

> INSERT INTO t (a, b) VALUES (''foo''::TEXT, ''bar''::TEXT);

This is not going to work more than once, because the INSERT caches
a plan that refers to the first-time-through temp table.

You could put the INSERT into an EXECUTE as well. Or use a different
PL language that doesn't cache plans.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2003-05-27 02:31:36 Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS)
Previous Message Mendola Gaetano 2003-05-27 00:55:50 Re: Bug in sequence dependency checking