X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id E3548B43376 for ; Mon, 7 Jul 2003 15:21:00 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 21681-06 for ; Mon, 7 Jul 2003 12:20:47 -0300 (ADT) Received: from sfpop.smtp.stsn.com (p32.n-sfpop03.stsn.com [199.107.154.32]) by svr1.postgresql.org (Postfix) with ESMTP id 47D12B43170 for ; Mon, 7 Jul 2003 12:20:47 -0300 (ADT) Received: from joeconway.com ([10.4.203.84]) by sfpop.smtp.stsn.com with Microsoft SMTPSVC(5.0.2195.5329); Sun, 6 Jul 2003 08:24:36 -0700 Message-ID: <3F098FA5.4000808@joeconway.com> Date: Mon, 07 Jul 2003 08:20:05 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Rowell Cc: pgsql-sql@postgresql.org Subject: Re: Database Upgrade scripts (AKA Conditional SQL execution) References: <1057586322.31898.18.camel@localhost> In-Reply-To: <1057586322.31898.18.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jul 2003 15:24:36.0781 (UTC) FILETIME=[B5BDBDD0:01C343D2] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/67 X-Sequence-Number: 14181 Richard Rowell wrote: > Can I accomplish this with postgresql without involving an external > process (like say perl)? I guess I could put the upgrade stuff into > PL/SQL functions and just drop the functions when I'm done, but I was > hoping for something a little "cleaner". > There is no way (currently at least) to do this without some kind of function. I've done it in the past with PL/pgSQL. We've had brief discussions in the past about how this could be supported, but nothing conclusive, and no one has cared enough to scratch this particular itch. Joe