From: | Kevin Heflin <kheflin(at)shreve(dot)net> |
---|---|
To: | Bryan White <bryan(at)arcamax(dot)com> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] pg_dump bug with default date |
Date: | 1999-03-10 23:20:19 |
Message-ID: | Pine.LNX.4.04.9903101719360.4494-100000@mercury.shreve.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 10 Mar 1999, Bryan White wrote:
> I use pg_dump to back up my database. I recently changed one of my date
> fields to have a default value as such:
> firstcontactdate date default current_date,
>
> If I pg_dump the database and reload the CREATE statment for this table
> fails. pg_dump used this defintion:
> "firstcontactdate" "date" DEFAULT date 'current'::datetime + '0 sec'),
> PSQL reports:
> ERROR: parser: parse error at or near "'"
>
> I can work around this problem by extracting the offending the table create
> statement from the script, pre-creating the table with a corrected
> definition and ignoring the error when the script tries to create the table.
> I don't want to edit the script directly because it is 50MB and growing.
> Fortunately the schema statements are all at the front so I can grab them
> with "head -1000".
I ran into this same problem with Postgres6.3x
--------------------------------------------------------------------
Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103
VP/Mac Tech | 333 Texas St #619 | FAX:318.221.6612
kheflin(at)shreve(dot)net | Shreveport, LA 71101 | http://www.shreve.net
--------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | M Simms | 1999-03-11 00:26:17 | Re: [GENERAL] More information |
Previous Message | Kevin Heflin | 1999-03-10 23:06:45 | Re: [GENERAL] Is it possible to change a columns name |