Received: from nollie.summersault.com (nollie.summersault.com [208.10.44.140]) by postgresql.org (8.11.3/8.11.4) with SMTP id g1JM3WE45676 for ; Tue, 19 Feb 2002 17:03:32 -0500 (EST) (envelope-from mark@summersault.com) Received: (qmail 71151 invoked from network); 19 Feb 2002 22:03:34 -0000 Received: from hoobella.summersault.com (HELO summersault.com) (208.10.44.182) by nollie.summersault.com with SMTP; 19 Feb 2002 22:03:34 -0000 Message-ID: <3C72CBB6.B7A46404@summersault.com> Date: Tue, 19 Feb 2002 17:04:01 -0500 From: Mark Stosberg Reply-To: mark@summersault.com Organization: Summersault X-Mailer: Mozilla 4.79C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) X-Accept-Language: en,pdf MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: CURRENT_TIMESTAMP breaking with 7.1->7.2 dump/import Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200202/243 X-Sequence-Number: 6667 Hello and thanks for the Postgres team for another fine release of Postgres. I'm working on doing some test dump/imports from Postgres 7.1 to Postgres 7.2. I'm using a 7.1 pg_dumpall, and a 7.2 psql to import. It's hanging on this error: ########################## CREATE TABLE "mail_history" ( "mail_id" integer DEFAULT nextval('mail_history_mail_id_seq'::text) NOT NULL, "subject" character varying(200), "body" text, "group_id" integer, "date_created" date DEFAULT date(('current'::"timestamp" + '00:00'::"interval")) NOT NULL, "n_sent" integer DEFAULT 0 ); ERROR: Bad timestamp external representation 'current' ################## The use of 'current' is clearly not suported as stated in the upgrade docs. What's frustrating is that the SQL I used to create the table WAS valid, using the standard CURRENT_DATE function, but Postgres internally connverted this into this broken format. Here was my original create statement: ######### create table mail_history ( mail_id serial, subject varchar(200), body text, group_id integer, date_created date not null default CURRENT_DATE, n_sent integer default 0 ); ####### This is from an old project. It might have started in Postgres 6.5.x and then been imported into Postgres 7.0 and then Postgres 7.1. Is there a way that I help coax Postgres into providing better support for this kind of legacy data? -mark