Search Postgresql Archives

Re: alter table schema on 8.0.X

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

 



On Thu, Dec 01, 2005 at 10:25:48AM -0200, William Leite Ara?jo wrote:
>      Hi, I'm trying alter a table schema on 'PostgreSQL 8.0.2 on
> i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5 (Debian 1:3.3.5-5)'.
>      On 8.1, by documentation, has the commant "ALTER TABLE <table> SET
> SCHEMA <new_schema>". Any solution for this in 8.0?
> 
> 
> Ps.: solutions different of "CREATE TABLE <new_schema.table> as SELECT *
> FROM schema.table" please.
> 
> --
> William Leite Ara?jo

Theoretically, you can do this manually, but there's a number of things
you need to look at. Your best bet is to read through
AlterTableNamespace in
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?rev=1.176
and see what it's doing.

It's always a bit dangerous mucking about with the system catalogs, so I
wouldn't recommend this for a production system.

If you do code up something that takes all those tables into account
it'd be good to share it with the community. If nothing else, one of the
core coders might tell you how risky it actually is.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[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