Re: [GENERAL] pg_dump does not handle default dates correctly - Mailing list pgsql-general

From Bryan White
Subject Re: [GENERAL] pg_dump does not handle default dates correctly
Date
Msg-id 003d01bee434$41756ec0$22d260d1@arcamax.com
Whole thread Raw
In response to pg_dump does not handle default dates correctly  ("Bryan White" <bryan@arcamax.com>)
List pgsql-general
> If I use pg_dump to backup a database table (or just its schema) and the
> table contains a date field defaulted to the current date then the
resulting
> table create statement is invalid.
>
> These shell commands demonstarte the problem:
> createdb db1
> createdb db2
> psql -c'create table t (d date default current_date)' db1
> pg_dump -s db1 | psql db2
>
> psql reports ERROR: parser: parse error at or near "'"
>
> This is using Postgres 6.5.0

I also should have listed the create statement produced by pg_dump

CREATE TABLE "t" (
 "d" date DEFAULT date( 'current'::datetime + '0 sec'));



pgsql-general by date:

Previous
From: "Bryan White"
Date:
Subject: pg_dump does not handle default dates correctly
Next
From: Héctor Morales
Date:
Subject: Problem with compiled C