Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5RK5Ca69477 for ; Wed, 27 Jun 2001 16:05:14 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5RK4SF13715; Wed, 27 Jun 2001 16:04:28 -0400 (EDT) To: Richard Huxton cc: Kristis Makris , pgsql-sql@postgresql.org Subject: Re: Using the extract() function in plpgsql In-reply-to: <3B3A265E.E13F3944@archonet.com> References: <200106202233.f5KMXSa91452@postgresql.org> <003701c0fa5e$722570a0$1001a8c0@archonet.com> <200106261958.f5QJwsa45412@postgresql.org> <3B398892.D0001CDE@archonet.com> <200106271556.f5RFu4a53609@postgresql.org> <3B3A265E.E13F3944@archonet.com> Comments: In-reply-to Richard Huxton message dated "Wed, 27 Jun 2001 19:30:54 +0100" Date: Wed, 27 Jun 2001 16:04:28 -0400 Message-ID: <13712.993672268@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/439 X-Sequence-Number: 3736 Richard Huxton writes: > 2. bad oid reference - even if we did recreate the table, the reference > to it is compiled in after the first run. Don't see a way around this one. You could work around that by making all the queries referencing the temp table be built up as strings and EXECUTE'd, rather than just writing them in-line in the plpgsql code. Pretty grotty but it might serve for now. Eventually plpgsql needs to have a way to discard query plans that have been obsoleted by DDL changes. regards, tom lane