pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Erwin Brandstetter <brsaweda@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Change order of table-columns in pg_catalog.pg_attribute.attnum
Date: Wed, 06 Jun 2007 10:59:19 -0400
Message-ID: <21001.1181141959@sss.pgh.pa.us> (raw)
In-Reply-To: <20070606143852.GF6377@alvh.no-ip.org>
References: <1181138388.508384.51110@q75g2000hsh.googlegroups.com>
	<20070606143852.GF6377@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Erwin Brandstetter escribió:
>> If I want to change the default order of two columns of a table, can I
>> just manipulate the values in
>> pg_catalog.pg_attribute.attnum?

> It works -- as long as the table is empty.

And as long as you have no views, foreign keys, indexes, defaults,
rules, etc etc etc referencing the columns.

Short answer is don't even think of trying it.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <21001.1181141959@sss.pgh.pa.us>
Permalink:  ../21001.1181141959@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21001.1181141959@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, brsaweda@gmail.com
  Subject: Re: Change order of table-columns in pg_catalog.pg_attribute.attnum
  In-Reply-To: <21001.1181141959@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox