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: 36775.10.0.4.254.1101806805.squirrel@webmail.arbodienst-limburg.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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?

Thanks!

Responses

Browse pgsql-general by date

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