Skip site navigation (1) Skip section navigation (2)

change natural column order

From: "Joolz" <joolz(at)arbodienst-limburg(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: change natural column order
Date: 2004-11-30 09:26:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Hello everyone,

When I create a table and later on (say, because customers want to
store extra info) add a column, like this:

  create table test (lastfield varchar);
  alter table test add column firstfield varchar;

is it possible to change the natural order of the columns
afterwards? The reason I need this is because the frontend picks up
table columns in natural order, looks at the datatype and creates
view, input and mutate (html) forms.

I'd rather not use views, allthough I know this is "the right way",
because it would make the application a lot more complex.

Can I dive into some system tables and change the natural order?



pgsql-general by date

Next:From: Richard HuxtonDate: 2004-11-30 09:32:02
Subject: Re: Inheritance in Postgres ?
Previous:From: Johan WehtjeDate: 2004-11-30 07:47:14
Subject: Re: Column n.nsptablespace does not exist error

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group