Re: pgAdmin3: adding comments to existing tables

From: Terence Kearns <terencek(at)isd(dot)canberra(dot)edu(dot)au>
To:
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: pgAdmin3: adding comments to existing tables
Date: 2003-07-17 01:44:25
Message-ID: 3F15FF79.3020507@cts.canberra.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Andreas Pflug wrote:
> Terence Kearns wrote:
>
>> because the interface attempts to "re-submit all" of the properties of
>> the existing table for alteration,
>
>
> That should not happen at all. There's a lot of effort taken to identify
> only changes, and submit only these changes.
>

Oh ok. my mistake. I assumed that after the following:

Using pgAdmin3, I create a table which now looks like...
CREATE TABLE global.users
(
"userCode" varchar(16),
"userId" int4 NOT NULL DEFAULT nextval('seq_userIds'::text),
fname varchar(32) NOT NULL,
lname varchar(32),
email varchar(256),
mobile varchar(32),
phone varchar(32),
"orgId" int4,
"selfGroup" int4 NOT NULL,
CONSTRAINT pk_users PRIMARY KEY ("userId"),
CONSTRAINT "unique_userCode" UNIQUE ("userCode")
) WITHOUT OIDS;

Then I select the properties panel in pgAdmin3 for this table and enter
some text in the comment field which is now blank. As a result, I get
the following error:

ERROR: Adding columns with defaults is not implemented.
Add the column, then use ALTER TABLE SET DEFAULT

After doing some more work on another table to fix it, I have another
theory, this table is broken because the function call used as the
DEFAULT value for userId will fail. (I've just learned that not keeping
everything lower-case in postgres tends to "break things" - despite all
the double quotes used).

--
Terence Kearns ~ ph: +61 2 6201 5516
IT Database/Applications Developer
Enterprise Information Systems
Client Services Division
University of Canberra
www.canberra.edu.au

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Terence Kearns 2003-07-17 06:33:48 double quoted object names
Previous Message Andreas Pflug 2003-07-16 20:29:53 Re: FW: pgAdmin3: adding comments to existing tables