Обсуждение: DROP COLUMN ?
Simple question, however could not find anything for it. How can we drop a column from a table ?
> Simple question, however could not find anything for it. Neither could I. If you check the docs (go to http://postgresql.org./, then to the users' lounge until you find http://www.ca.postgresql.org/users-lounge/docs/7.1/reference/sql-altertable. html at the Reference Manual) you will see the ALTER TABLE command doesn't include a DROP COLUMN action. > How can we drop a column from a table ? It seems we can't. -- _ / \ Leandro Guimarães Faria Corcete Dutra +55 (11) 3040 8913 \ / Amdocs Brasil Ltda at Tele Danmark +45 3387 5214 X http://geocities.com./lgdutra/ mailto:leandrod@amdocs.com / \ Campanha fita ASCII mailto:moreno@tdk.dk
On Wed, 25 Apr 2001 esavas@mac.com wrote: > Simple question, however could not find anything for it. > How can we drop a column from a table ? Alas, it's not yet supported in PostgreSQL. -- Brett http://www.chapelperilous.net/btfwk/ ------------------------------------------------------------------------ Never raise your hand to your children -- it leaves your midsection unprotected. -- Robert Orben
> > How can we drop a column from a table ? > > It seems we can't. The SQL command ALTER TABLE DROP COLUMN isn't supported; see http://www.ca.postgresql.org/docs/faq-english.html#4.5 for a work-around; note that I dimly recall some caveats regarding using this workaround, so tread lightly (back everything up first, and test the results thoroughly afterwards). Eric Lawson
On Thu, 26 Apr 2001, ERIC Lawson - x52010 wrote: > > > How can we drop a column from a table ? > > > > It seems we can't. > > The SQL command ALTER TABLE DROP COLUMN isn't supported; see > > http://www.ca.postgresql.org/docs/faq-english.html#4.5 > > for a work-around; note that I dimly recall some caveats regarding > using this workaround, so tread lightly (back everything up first, and > test the results thoroughly afterwards). Also a new tutorial on this & other schema changes at http://techdocs.postgresql.org/techdocs/updatingcolumns.html -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington