pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDeleting a COL
8+ messages / 5 participants
[nested] [flat]
* Deleting a COL
@ 2000-04-01 20:34 Antonio Lagnada <lagnada@tbsoa.com>
2000-04-01 21:46 ` Re: Deleting a COL Oliver Elphick <olly@lfix.co.uk>
2000-04-01 23:12 ` Re: Deleting a COL Bruce Momjian <pgman@candle.pha.pa.us>
2000-04-02 05:31 ` Re: Deleting a COL John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
0 siblings, 3 replies; 8+ messages in thread
From: Antonio Lagnada @ 2000-04-01 20:34 UTC (permalink / raw)
To: pgsql-sql
Does anyone know how to delete a column in PostgreSQL?
I cannot find the SQL command to do it.
---
Antonio W. Lagnada
lagnada@tbsoa.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
@ 2000-04-01 21:46 ` Oliver Elphick <olly@lfix.co.uk>
2000-04-01 22:17 ` RE: Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
2000-04-02 05:50 ` Re: Deleting a COL John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
2 siblings, 2 replies; 8+ messages in thread
From: Oliver Elphick @ 2000-04-01 21:46 UTC (permalink / raw)
To: Antonio Lagnada <lagnada@tbsoa.com>; +Cc: pgsql-sql
"Antonio Lagnada" wrote:
>
>Does anyone know how to delete a column in PostgreSQL?
>I cannot find the SQL command to do it.
ALTER TABLE DROP COLUMN colname
(but I don't think it's supported before release 7.0)
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Therefore, if anyone is in Christ, he is a new
creation; the old has gone, the new has come."
II Corinthians 5:17
^ permalink raw reply [nested|flat] 8+ messages in thread
* RE: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
2000-04-01 21:46 ` Re: Deleting a COL Oliver Elphick <olly@lfix.co.uk>
@ 2000-04-01 22:17 ` Antonio Lagnada <lagnada@tbsoa.com>
1 sibling, 0 replies; 8+ messages in thread
From: Antonio Lagnada @ 2000-04-01 22:17 UTC (permalink / raw)
To: Oliver Elphick <olly@lfix.co.uk>; +Cc: pgsql-sql
You're right...I tried executing the drop column command but said that it's
not yet implemented.
When is release 7.0 ready for use?
-----Original Message-----
From: Oliver Elphick [mailto:olly@lfix.co.uk]
Sent: Saturday, April 01, 2000 3:47 PM
To: Antonio Lagnada
Cc: Pgsql-sql
Subject: Re: [SQL] Deleting a COL
"Antonio Lagnada" wrote:
>
>Does anyone know how to delete a column in PostgreSQL?
>I cannot find the SQL command to do it.
ALTER TABLE DROP COLUMN colname
(but I don't think it's supported before release 7.0)
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Therefore, if anyone is in Christ, he is a new
creation; the old has gone, the new has come."
II Corinthians 5:17
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
2000-04-01 21:46 ` Re: Deleting a COL Oliver Elphick <olly@lfix.co.uk>
@ 2000-04-02 05:50 ` John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
2000-04-02 06:19 ` Re: Deleting a COL Oliver Elphick <olly@lfix.co.uk>
1 sibling, 1 reply; 8+ messages in thread
From: John M. Flinchbaugh @ 2000-04-02 05:50 UTC (permalink / raw)
To: Oliver Elphick <olly@lfix.co.uk>; +Cc: Antonio Lagnada <lagnada@tbsoa.com>; pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, 1 Apr 2000, Oliver Elphick wrote:
> ALTER TABLE DROP COLUMN colname
> (but I don't think it's supported before release 7.0)
just a note, if it is supported, it is not documented yet in psql, or man
alter_table of pgsql 7.0beta3.
____________________}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
iEYEARECAAYFAjjm4JYACgkQCGPRljI8082BOACfRc2HGUIL+zZ5i2LOFojpB9Bi
B2AAn3I4+XXvq6tkKNxN09+8diDRBTg4
=QefK
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
2000-04-01 21:46 ` Re: Deleting a COL Oliver Elphick <olly@lfix.co.uk>
2000-04-02 05:50 ` Re: Deleting a COL John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
@ 2000-04-02 06:19 ` Oliver Elphick <olly@lfix.co.uk>
0 siblings, 0 replies; 8+ messages in thread
From: Oliver Elphick @ 2000-04-02 06:19 UTC (permalink / raw)
To: John M. Flinchbaugh <glynis@butterfly.hjsoft.com>; +Cc: Oliver Elphick <olly@lfix.co.uk>; Antonio Lagnada <lagnada@tbsoa.com>; pgsql-sql; olly@linda.lfix.co.uk
"John M. Flinchbaugh" wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Sat, 1 Apr 2000, Oliver Elphick wrote:
>> ALTER TABLE DROP COLUMN colname
>> (but I don't think it's supported before release 7.0)
>
>just a note, if it is supported, it is not documented yet in psql, or man
>alter_table of pgsql 7.0beta3.
Sorry, I think I was confusing it with something else. The syntax is supported
in the parser, but:
junk=# alter table t2 drop column name restrict;
ERROR: ALTER TABLE / DROP COLUMN is not implemented
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"If the Son therefore shall make you free, ye shall be
free indeed." John 8:36
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
@ 2000-04-01 23:12 ` Bruce Momjian <pgman@candle.pha.pa.us>
2 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2000-04-01 23:12 UTC (permalink / raw)
To: Antonio Lagnada <lagnada@tbsoa.com>; +Cc: pgsql-sql
See Faq item on this DROP COLUMN.
[Charset iso-8859-1 unsupported, filtering to ASCII...]
>
> Does anyone know how to delete a column in PostgreSQL?
> I cannot find the SQL command to do it.
>
> ---
> Antonio W. Lagnada
> lagnada@tbsoa.com
>
>
>
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
@ 2000-04-02 05:31 ` John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
2000-04-02 16:04 ` Re: Deleting a COL Fabrice Scemama <fabrice.scemama@gesnet.net>
2 siblings, 1 reply; 8+ messages in thread
From: John M. Flinchbaugh @ 2000-04-02 05:31 UTC (permalink / raw)
To: Antonio Lagnada <lagnada@tbsoa.com>; +Cc: pgsql-sql
-----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-----
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Deleting a COL
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
2000-04-02 05:31 ` Re: Deleting a COL John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
@ 2000-04-02 16:04 ` Fabrice Scemama <fabrice.scemama@gesnet.net>
0 siblings, 0 replies; 8+ messages in thread
From: Fabrice Scemama @ 2000-04-02 16:04 UTC (permalink / raw)
To: ; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2000-04-02 16:04 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-04-01 20:34 Deleting a COL Antonio Lagnada <lagnada@tbsoa.com>
2000-04-01 21:46 ` Oliver Elphick <olly@lfix.co.uk>
2000-04-01 22:17 ` Antonio Lagnada <lagnada@tbsoa.com>
2000-04-02 05:50 ` John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
2000-04-02 06:19 ` Oliver Elphick <olly@lfix.co.uk>
2000-04-01 23:12 ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-04-02 05:31 ` John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
2000-04-02 16:04 ` Fabrice Scemama <fabrice.scemama@gesnet.net>
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