X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C035147595A for ; Thu, 20 Feb 2003 01:16:02 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 65014-09 for ; Thu, 20 Feb 2003 01:15:48 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 8DC87474E61 for ; Thu, 20 Feb 2003 01:15:42 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2848702; Wed, 19 Feb 2003 22:15:44 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "jack" , Subject: Re: problem on truncate for v.7.3.2 Date: Wed, 19 Feb 2003 22:14:24 -0800 User-Agent: KMail/1.4.3 References: <002b01c2d8a3$53f10b10$1400a8c0@jac> In-Reply-To: <002b01c2d8a3$53f10b10$1400a8c0@jac> MIME-Version: 1.0 Message-Id: <200302192214.24999.josh@agliodbs.com> Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/447 X-Sequence-Number: 11845 Jack, > On version 7.3.2, 'truncate' can not be executed from pl/pgsql. But it > isn't stated on change notes. Is it a bug? No, it's a fix.=20=20=20 TRUNCATE, VACUUM, ANALYZE, and REINDEX all perform COMMIT statements as par= t=20 of their operation. If called within a function, this could cause part of= =20 the function to be committed while the rest failed, or even cause a fatal= =20 error.=20=20=20 As such, these statements have been deliberately disabled within PL/pgSQL a= nd=20 SQL functions. --=20 Josh Berkus Aglio Database Solutions San Francisco