Re: [NOVICE] alter table table add column

From: "Peter Childs" <peterachilds(at)gmail(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [NOVICE] alter table table add column
Date: 2007-07-31 07:54:15
Message-ID: a2de01dd0707310054s76a15846x3403d68d9e4e97c3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-novice pgsql-sql

On 31/07/07, Ronald Rojas <ronald(dot)rojas(at)gmail(dot)com> wrote:
>
> 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 Glaesemanngrzm seespotcode net
>
> But really you should not be using select * from ... anyway,
Always list your column names, That way you will aways get the columns in
the order you want rather than in the order they are stored.

This really belongs in a FAQ

Peter.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Nis Jørgensen 2007-07-31 07:56:47 Re: alter table table add column
Previous Message Ronald Rojas 2007-07-31 06:37:28 Re: [NOVICE] alter table table add column

Browse pgsql-general by date

  From Date Subject
Next Message Nis Jørgensen 2007-07-31 07:56:47 Re: alter table table add column
Previous Message Gregory Stark 2007-07-31 07:16:28 Re: Manual Vaccum very slow with Autovaccum enabled

Browse pgsql-novice by date

  From Date Subject
Next Message Nis Jørgensen 2007-07-31 07:56:47 Re: alter table table add column
Previous Message Luca Ferrari 2007-07-31 07:07:56 Re: doubt about datum

Browse pgsql-sql by date

  From Date Subject
Next Message Nis Jørgensen 2007-07-31 07:56:47 Re: alter table table add column
Previous Message Ronald Rojas 2007-07-31 06:37:28 Re: [NOVICE] alter table table add column