From: Fabrice Scemama <fabrice.scemama@gesnet.net>
Cc: Pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Deleting a COL
Date: Sun, 02 Apr 2000 18:04:13 +0200
Message-ID: <38E76F7D.30248E46@gesnet.net> (raw)
References: <Pine.LNX.4.21.0004020015390.23664-100000@butterfly.hjsoft.com>
Personnally, i do this:
alter table xxx rename bad_col to ___scratchY;
where Y is a number.
Every day, just before the vacuum is done, a cron
will stop the daemon and make the operation being
proposed below, if ___scratchYs fields are found.
I suspect databases like SQL Server7
to announce delete row possible, but to content
themselves with renaming and hiding.
"John M. Flinchbaugh" wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sat, 1 Apr 2000, Antonio Lagnada wrote:
> > Does anyone know how to delete a column in PostgreSQL?
> > I cannot find the SQL command to do it.
>
> i don't think you can. you can though create a new table with the
> desired fields, select or insert into it from the old table, drop the old
> table, then rename the new to the old.
>
> ____________________}John Flinchbaugh{______________________
> | glynis@hjsoft.com http://www.hjsoft.com/~glynis/ |
> ~~Powered by Linux: Reboots are for hardware upgrades only~~
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.0 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iEYEARECAAYFAjjm26AACgkQCGPRljI8080B6ACgkQzO5QKrSOogVK2WDYYiyAdK
> nAYAn0xWRca+n+05m0mEVdmGDgsyBWKz
> =iIus
> -----END PGP SIGNATURE-----
--
"Ce n'est pas parce qu'on dit : "Fermez la porte, il fait froid
dehors", qu'il fait moins froid dehors quand la porte est fermee." --
Pierre Dac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: fabrice.scemama@gesnet.net
Subject: Re: Deleting a COL
In-Reply-To: <38E76F7D.30248E46@gesnet.net>
References: <Pine.LNX.4.21.0004020015390.23664-100000@butterfly.hjsoft.com> <38E76F7D.30248E46@gesnet.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox