Re: [ADMIN] Change order of table-columns in pg_catalog.pg_attribute.attnum

2007-06-06 Thread Igor Neyman
22 AM To: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Change order of table-columns in pg_catalog.pg_attribute.attnum On Jun 6, 4:59 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Erwin Brandstetter escribió: > >> If I want to ch

Re: [ADMIN] Change order of table-columns in pg_catalog.pg_attribute.attnum

2007-06-06 Thread Erwin Brandstetter
On Jun 6, 4:59 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > Alvaro Herrera <[EMAIL PROTECTED]> 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

Re: [ADMIN] Change order of table-columns in pg_catalog.pg_attribute.attnum

2007-06-06 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> 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, fo

Re: [ADMIN] Change order of table-columns in pg_catalog.pg_attribute.attnum

2007-06-06 Thread Alvaro Herrera
Erwin Brandstetter escribió: > Hi group! > > 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. -- Alvaro Herrerahttp://www.CommandPro

[ADMIN] Change order of table-columns in pg_catalog.pg_attribute.attnum

2007-06-06 Thread Erwin Brandstetter
Hi group! 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? I am trying to do this in pg 8.1.9. Works the same in pg 8.2.x I would assume? BEGIN; UPDATE pg_catalog.pg_attribute SET attnum = 4 WHERE attrelid = 12345