Unable to convert date to tm - Mailing list pgsql-general

From Jeff MacDonald
Subject Unable to convert date to tm
Date
Msg-id HIEGJGDMNIKAMPPDEKBNEEIBCCAA.jeff@interchange.ca
Whole thread Raw
In response to Re:  (Darren Ferguson <darren@crystalballinc.com>)
List pgsql-general
Just giving the thread a topic.. forgot the first time.

> -----Original Message-----
> From: Darren Ferguson [mailto:darren@crystalballinc.com]
> Sent: Wednesday, October 09, 2002 10:46 AM
> To: Jeff MacDonald
> Cc: Postgres List
> Subject: Re: [GENERAL]
>
>
> Yep weird using 7.2.1 and none work on the machine as seen below
>
> oss=> create table test (id integer, birthdate date);
> CREATE
> oss=> insert into test values (343,'1930-04-27');
> INSERT 1283350 1
> oss=> insert into test values (345,'1963-09-15');
> INSERT 1283351 1
> oss=> SELECT id,birthdate FROM users WHERE id IN (343,345);
> ERROR:  Attribute 'id' not found
> oss=> SELECT id,birthdate FROM test WHERE id IN (343,345);
>  id  | birthdate
> -----+------------
>  343 | 1930-04-27
>  345 | 1963-09-15
> (2 rows)
>
> oss=> SELECT age('1995-01-01',birthdate) FROM test where id = 343;
> ERROR:  Unable to convert date to tm
> oss=> SELECT age('1995-01-01',birthdate) FROM test where id = 345;
> ERROR:  Unable to convert date to tm
> oss=> select version();
>                            version
> -------------------------------------------------------------
>  PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
> (1 row)
>
> Definately weird
>
>
> On Wed, 9 Oct 2002, Jeff MacDonald wrote:
>
> > Hi Folks,
> >
> > This problem is occuring on pgsql 7.2.1 as well as 7.2.2.
> > I have nothing to say except this is VERY weird. Is there something
> > evil about 1930-04-27 ?
> >
> > xxx=>SELECT id,birthdate FROM users WHERE id IN (343,345);
> >  id  | birthdate
> > -----+------------
> >  343 | 1930-04-27
> >  345 | 1963-09-15
> > (2 rows)
> >
> > xxx=> SELECT age('1995-01-01',birthdate) FROM users where id =343;
> > ERROR:  Unable to convert date to tm
> > xxx=> SELECT age('1995-01-01',birthdate) FROM users where id =345;
> >               age
> > -------------------------------
> >  31 years 3 mons 16 days 01:00
> > (1 row)
> >
> >
> >
> >   ---
> > Jeff MacDonald
> > Interchange Technologies
> > jeff@interchange.ca
> >   ---
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
>
> --
> Darren Ferguson
>


pgsql-general by date:

Previous
From: "Patrick Fiche"
Date:
Subject: Re:
Next
From: Ed L.
Date:
Subject: Backup alternatives