Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 87E099FBA1C for ; Tue, 31 Jul 2007 03:37:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 01375-04 for ; Tue, 31 Jul 2007 03:37:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.190]) by postgresql.org (Postfix) with ESMTP id 3270A9FB9F1 for ; Tue, 31 Jul 2007 03:37:44 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id f1so444113rvb for ; Mon, 30 Jul 2007 23:37:43 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=qYRukE2gkksEyMLIjXOr88juxhzSthssfmqhQ40S98En3wP8ISJdpPx8NEFCoMicigxDh89+CQv/cXLjhVUlBU8wHB/zcrzI/ubp9UXCOAkHrrejmGNvkQE+O6lZsrVO/zCOFEDYiKUyUxK41a+onbCXROKPM7MO9M9hs4/OG90= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=o4baRu60wHtIdIQx83tvIM2s/BeR5tIZ32tueatwctrkQQu8Hv7po3ESmLCMctJyYf73V8LxaDlY60BzTsSQ7wwlRgVn8tl2lbxsuqLfKNmeR4lMdaU+S+w8LJbmPluLmgbIA3Ff+PVMoIPFxbagu4P9ocOLVBUvQGR1C9PHVho= Received: by 10.140.141.15 with SMTP id o15mr2099616rvd.1185863863806; Mon, 30 Jul 2007 23:37:43 -0700 (PDT) Received: from ?133.88.3.33? ( [203.87.136.43]) by mx.google.com with ESMTPS id 2sm6275026rvi.2007.07.30.23.37.38 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Jul 2007 23:37:43 -0700 (PDT) Subject: Re: [NOVICE] alter table table add column From: Ronald Rojas To: Michael Glaesemann Cc: pgsql-general@postgresql.org In-Reply-To: <3345E320-08CF-465E-93AC-DAFBD59AA35C@seespotcode.net> References: <1185855587.28634.6.camel@localhost> <7F69A56D-27E8-43EE-BD1C-AB52C042B533@seespotcode.net> <1185859391.28634.17.camel@localhost> <3345E320-08CF-465E-93AC-DAFBD59AA35C@seespotcode.net> Content-Type: multipart/alternative; boundary="=-/c5FOEyVJ5n9YLrn66A0" Date: Tue, 31 Jul 2007 14:37:28 +0800 Message-Id: <1185863848.28634.19.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/1193 X-Sequence-Number: 117794 --=-/c5FOEyVJ5n9YLrn66A0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Oh yes you have a good point. But then I will still have to test insert and update on views. Thanks a lot michael! On Tue, 2007-07-31 at 00:56 -0500, Michael Glaesemann wrote: > On Jul 31, 2007, at 0:23 , Ronald Rojas wrote: > > > Yes I know that procedure but I would like to insert in between > > because I have at third party software that will call the said > > schema and one of its dependencies with the mapping is it should > > have the correct order with what the receiving end will be use for > > the mapping. And in this case, I can't modify the receiving > > structure (third-party) and the tables that I will be using is in > > on production state. So would only mean that I have to schedule a > > very fast maintenance, probably 5 to 10 secs just to re-initialize > > the tables. > > Another option would be to use views to change the column order, > which would work for selects. I believe you could create rules for > insert and update as well, if necessary. Perhaps this would be a > solution to your problem. > > Michael Glaesemann > grzm seespotcode net > > ================================================================================================== Ronald Rojas Systems Administrator Linux Registered User #427229 ================================================================================================== Arnold's Laws of Documentation: (1) If it should exist, it doesn't. (2) If it does exist, it's out of date. (3) Only documentation for useless programs transcends the first two laws. --=-/c5FOEyVJ5n9YLrn66A0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Oh yes you have a good point. But then I will still have to test insert and update on views.

Thanks a lot michael!

On Tue, 2007-07-31 at 00:56 -0500, Michael Glaesemann wrote:
On Jul 31, 2007, at 0:23 , Ronald Rojas wrote:

> Yes I know that procedure but I would like to insert in between  
> because I have at third party software that will call the said  
> schema and one of its dependencies with the mapping is it should  
> have the correct order with what the receiving end will be use for  
> the mapping. And in this case, I can't modify the receiving  
> structure (third-party) and the tables that I will be using is in  
> on production state. So would only mean that I have to schedule a  
> very fast maintenance, probably 5 to 10 secs just to re-initialize  
> the tables.

Another option would be to use views to change the column order,  
which would work for selects. I believe you could create rules for  
insert and update as well, if necessary. Perhaps this would be a  
solution to your problem.

Michael Glaesemann
grzm seespotcode net



==================================================================================================
Ronald Rojas
Systems Administrator
Linux Registered  User #427229
==================================================================================================

Arnold's Laws of Documentation:
	(1) If it should exist, it doesn't.
	(2) If it does exist, it's out of date.
	(3) Only documentation for useless programs transcends the
	    first two laws.


--=-/c5FOEyVJ5n9YLrn66A0--