Re: alter table drop column status - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: alter table drop column status
Date
Msg-id GNELIHDDFBOCMGBFGEFOOEGICBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: alter table drop column status  (Jean-Michel POURE <jm.poure@freesurf.fr>)
Responses Re: alter table drop column status  (Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>)
List pgsql-hackers
That's the only way to do it at the moment - would you like to collaborate
on the actual sql script to get this done?  I wonder if it could be done
entirely with a stored procedure?  That'd be cool:

select drop_column(mytable, mycolumn);

Sweet :)

I'd like to implement this for phpPgAdmin as well.

Chris

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: Thursday, 14 February 2002 5:17 PM
> To: Kovacs Zoltan; Hiroshi Inoue; dpage@pgadmin.org
> Cc: Christopher Kings-Lynne; Tom Lane; pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] alter table drop column status
>
>
> Le Mercredi 13 Février 2002 18:23, Kovacs Zoltan a écrit :
> > I wanted to know if I should wait for the solution of the full
> ALTER TABLE
> > implementation or not. I'm afraid I shouldn't wait, should I? ;-)
>
> What we could do using pgAdmin2 is :
> ("table_from" is the table to be modified, "table_to" is the
> resulting table)
>
> 1) Mark objects for deletion
> * mark columns in "table_from" for deletion,
> * mark primary keys in "table_from" for deletion,
> * mark foreign keys in "table_from" for deletion,
>
> 2) Copy schema and data
> * copy "table_to" structure out of "table_from" keeing only
> marked objects,
> * copy data from "table_from" to "table_to",
>
> 3) Add rules and triggers, rename
> * add "table_from" triggers to "table_to",
> * add "table_from" rules to "table_to",
> * drop table "table_from",
> * rename "table_to".
>
> The same script should also work for inherited tables.
>
> This could be a hack until equivalent features are added natively to
> PostgreSQL. Do you think it is relevant to add this feature to
> pgAdmin2? Does
> Hiroshi script provide the same kind of features?
>
> What is your opinion my dear friends? We wait for your advice.
>
> Cheers,
> jean-Michel POURE
>



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange problem when upgrading to 7.2 with pg_upgrade.
Next
From: David Terrell
Date:
Subject: Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu