Search Postgresql Archives

Re: change attnum in pg_catalog.pg_attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Grzegorz =?iso-8859-2?q?Prze=BCdziecki?= <Grzegorz.Przezdziecki@xxxxxxxxxxxxxxxx> writes:
>> It won't work and will likely crash the backend.

> Even if I will do like this  and for ever??

> 1. attnum will be unique and greater than 0
> 2. no holes in attnum numeric 
> 3. Make change
> 4. restart postgresql

Yes, unless you also TRUNCATE the table, because attnum ordering tells
about the physical data layout within the table rows.  Furthermore,
altering only pg_attribute is unlikely to represent a complete update
of the catalogs --- attnums also show up in pg_index, pg_attrdef,
pg_depend, pg_rewrite if there are any rules or views mentioning the
columns, and probably some other places I forgot.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux