> However, is there an easy way of obtaining the list of columns (and their
> types/indexes/etc) in a table, so that we can recreate table a with just
> that column missing? One which won't break when the underlying pg_* schema 
> changes?

I see.  No, not that I know of.  You could take an SQL dump of the DB
and work on that, then restore at the end of the upgrade process -- but
thats not so good :)

Anyway, I'd *really* like to see PostgreSQL officially supported by
Bugzilla.

We may get DROP COLUMN in this release (Christopher?).

Changing data types probably won't appear. I don't know of anyone
working on it -- and it can be quite a complex issue to get a good
(resource friendly and transaction safe) version.

That said, if drop column is finished in time would the below be close
enough to do a data type change?:

alter table <table> rename <column> to <coltemp>;
alter table <table> add column <column> <newtype>;
update table <table> set <column> = <coltemp>;
alter table <table> drop column <coltemp>;


Are there any other requirements aside from drop column and altering
data types?




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to