Received: from frithjof.reiner (a30.dialin.tuwien.ac.at [192.35.240.40]) by postgresql.org (8.11.3/8.11.1) with SMTP id f34G24848809 for ; Wed, 4 Apr 2001 12:02:05 -0400 (EDT) (envelope-from areiner@tph.tuwien.ac.at) Received: (qmail 2212 invoked by uid 500); 4 Apr 2001 11:04:23 -0000 From: "Albert REINER" Date: Wed, 4 Apr 2001 13:04:23 +0200 To: PostgreSQL-SQL Subject: Historical dates in Timestamp Message-ID: <20010404130423.A2180@frithjof> Mail-Followup-To: PostgreSQL-SQL Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Archive-Number: 200104/48 X-Sequence-Number: 2387 Saluton, I have a database with dates, some of which are historical dates. When I wanted to enter May 28th, 812 I got an error message, had to use 0812 for the year instead: albert=> CREATE DATABASE test; CREATE DATABASE albert=> \c test You are now connected to database test. test=> CREATE TABLE dates (d timestamp); CREATE test=> insert into dates (d) values ('812-5-28'); ERROR: Bad timestamp external representation '812-5-28' test=> insert into dates (d) values ('0812-5-28'); INSERT 81801 1 The same happens for BC dates: test=> insert into dates (d) values ('812-5-28 BC'); ERROR: Bad timestamp external representation '812-5-28 BC' test=> insert into dates (d) values ('0812-5-28 BC'); INSERT 81802 1 Is it really reasonable to enforce that the number of years is four digits at least? I'm running: test=> SELECT version(); version -------------------------------------------------------------------- PostgreSQL 7.0.2 on i586-pc-linux-gnulibc1, compiled by gcc 2.95.1 (1 row) Bye, Albert.