Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 1AB1D9FA5DC for ; Thu, 5 Oct 2006 12:30:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 58453-10 for ; Thu, 5 Oct 2006 15:30:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 7DBC79FB24F for ; Thu, 5 Oct 2006 12:30:07 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1GVVSo-0003Mf-Eq for pgsql-sql@postgresql.org; Thu, 05 Oct 2006 11:48:46 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 46D444051; Thu, 5 Oct 2006 11:29:52 -0400 (EDT) Date: Thu, 5 Oct 2006 11:29:52 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: i have table Message-ID: <20061005152952.GA8826@phlogiston.dyndns.org> References: <45237D6E.1030601@logix-tt.com> <4523C3E2.4010300@myemma.com> <4523D51F.4070208@myemma.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/59 X-Sequence-Number: 26448 On Wed, Oct 04, 2006 at 11:20:07AM -0500, Aaron Bono wrote: > > So do it as needed and convert your application slowly. You don't even need to do that. ALTER TABLE tablename RENAME TO tablename_real; CREATE VIEW tablename [&c.] Now the view looks to the application just like the old table. If you want to insert &c., you put some rules there. A -- Andrew Sullivan | ajs@crankycanuck.ca Users never remark, "Wow, this software may be buggy and hard to use, but at least there is a lot of code underneath." --Damien Katz