Re:

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: Jeff MacDonald <jeff(at)interchange(dot)ca>
Cc: Postgres List <pgsql-general(at)postgresql(dot)org>
Subject: Re:
Date: 2002-10-09 14:46:19
Message-ID: Pine.LNX.4.44.0210091045430.20024-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(at)interchange(dot)ca
> ---
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Darren Ferguson

In response to

  • at 2002-10-09 14:41:49 from Jeff MacDonald

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff MacDonald 2002-10-09 15:06:42 Unable to convert date to tm
Previous Message Jeff MacDonald 2002-10-09 14:41:49