Re: BUG #4166: Alter table add column from PgAdminIII - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #4166: Alter table add column from PgAdminIII
Date
Msg-id 482AA05D.6080903@enterprisedb.com
Whole thread Raw
In response to BUG #4166: Alter table add column from PgAdminIII  ("Mike Gagnon" <mike.gagnon@bellnet.ca>)
List pgsql-bugs
Mike Gagnon wrote:
> I used PGAdmin III to add a character varying column(400) length, not null
> default ''.  I get the column displayed in psql when I do a simple query
> like SELECT * from MyTable limit 1;
>
> When I try to do Update MyTable set NewColumn='something';   I get the error
> saying that the column doesn't exist....  It thinks it exists when I do my
> select, but it doesn't recognize this new column in my UPDATE...

Perhaps you created the column with a capital letter? If that's the
case, you'll have to quote the column name: ... set
"NewColumn"='something'. If that's what happened, I'd suggest dropping
and recreating the column in all-lowercase.

If this didn't help, please post the output of the "SELECT *" verbatim.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: "Mike Gagnon"
Date:
Subject: BUG #4166: Alter table add column from PgAdminIII
Next
From: Tom Lane
Date:
Subject: Re: BUG #4166: Alter table add column from PgAdminIII