Search Postgresql Archives

Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data

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

 



Reid Thompson <Reid.Thompson@xxxxxxxx> writes:
> My assumption is that converting varchar(n) to text would still force a
> re-write of the table?  i.e. currently there's no officially 'safe' way
> to convert the field type w/o incurring a table re-write.

If you do it through ALTER TABLE, yes.  Since text and varchar are the
same thing on disk, you could get away with just manually updating the
pg_attribute row for the column ... but I'd counsel practicing on a
scratch database ;-)

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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