Re: cannot remove column + no error msg

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: cannot remove column + no error msg
Date: 2006-12-11 15:43:54
Message-ID: 20061211154354.GP21674@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

am Mon, dem 11.12.2006, um 16:11:24 +0100 mailte Bram Kuijper folgendes:
> Hi all,
>
> sorry for the clutter, but cannot find a good answer to this problem in
> the mailinglist archives:
>
> If I execute either of both commands (I run postgresql 8.1.4 on Ubuntu
> GNU/linux):
>
> # ALTER TABLE table_name DELETE COLUMN column
> # ALTER TABLE table_name DROP COLUMN column

You are in the psql-tool?

The first syntax is wrong, the latter are okay, but you need a ';' on
the linend.

>
> nothing happens... if I do
>
> # \d table_name,

test=# \d foobar
Table "public.foobar"
Column | Type | Modifiers
--------+---------+-----------
id | integer |
a | integer |
b | integer |
c | integer |

test=# alter table foobar drop column c;
ALTER TABLE
test=*# \d foobar
Table "public.foobar"
Column | Type | Modifiers
--------+---------+-----------
id | integer |
a | integer |
b | integer |

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel T. Staal 2006-12-11 15:55:20 Re: cannot remove column + no error msg
Previous Message Bram Kuijper 2006-12-11 15:11:24 cannot remove column + no error msg