Re: Inserting a new column in between. - Mailing list pgsql-general

From Noel Faux
Subject Re: Inserting a new column in between.
Date
Msg-id 45E15042.1060909@med.monash.edu.au
Whole thread Raw
In response to Re: Inserting a new column in between.  (RPK <rohitprakash123@indiatimes.com>)
List pgsql-general
Hi RPK

My suggestion would be to create a view which presents the columns as
you wish.

eg

CREATE OR REPLACE VIEW tableView AS
 SELECT a, b, c
   FROM table

Then when you add add a new column, just adjust the view as required.

Cheers
Noel

RPK wrote:
> Andreas,
>
> I am talking about inserting a field or changing their order in the
> structure itself. In MS Access and SQL Server we have this facility. Some
> times I need to shift the less important field to the last so that when I
> query using:
>
Postgres does not allow such ordering as stated in the previous replies.



pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Inserting a new column in between.
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Wikipedia on Postgres (was Re: postgresql vs mysql)