Re: Default Values

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'George T(dot) Gibson'" <gtgibson(at)jbstamping(dot)com>, "'pgadmin-support(at)postgresql(dot)org'" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Default Values
Date: 2002-01-30 22:17:46
Message-ID: FED2B709E3270E4B903EB0175A49BCB10B52E9@dogbert.vale-housing.co.uk
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> -----Original Message-----
> From: George T. Gibson [mailto:gtgibson(at)jbstamping(dot)com]
> Sent: 30 January 2002 21:54
> To: pgadmin-support(at)postgresql(dot)org
> Subject: [pgadmin-support] Default Values
>
>
> Having some trouble with default values.
>
> My table already exists. I want to update default values so
> I go to the table properties box and enter the new value for
> date - CURRENT_DATE.
>
> Clicked OK and in the Log view I get:
>
> 1/30/2002 4:42:43 PM - SQL (jbsdata): ALTER TABLE
> "note" ALTER COLUMN "date" DROP DEFAULT
>
> The new default value shows up under the table properties,
> but when I do a refresh the value is cleared. I'm new to
> this but the above sql does not seem correct for adding a new
> value? Am I doing something wrong here? Thanks for your help.

Hi George,

Thanks for the report - I've found and fixed the bug for the next release.
In the meantime, in an SQL window, you should be able to use a query like:

ALTER TABLE "note" ALTER COLUMN "date" SET DEFAULT CURRENT_DATE

To update your columns default value.

Regards, Dave.

Browse pgadmin-support by date

  From Date Subject
Next Message NH-Jason 2002-01-31 07:47:34 How to change the structure of tables with pgadmin2?
Previous Message Dave Page 2002-01-30 21:59:03 Re: Consistent page fault in pgadmin2 1.2.0