Re: problems with timestamp data type

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Juan Pablo <jp_grassi(at)yahoo(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: problems with timestamp data type
Date: 2002-07-18 17:09:25
Message-ID: 20020718100539.S72961-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 17 Jul 2002, Juan Pablo wrote:

> SELECT date_part('year', fechaacta) AS "Ao de
> donacin", sexo AS "Sexo", count(*) AS "Cantidad de
> donantes"
> FROM "Capital"
> WHERE
> date_part('year', age(timestamp(fechanacimiento)))
> BETWEEN 1 AND 100
> AND "fecha" BETWEEN '2001/01/01' AND '2002/12/31'
> GROUP BY date_part('year', fechaacta), sexo
...
> Exactly the same query has been working fine for a
> year with PostgreSQL v 7.1.3 in exactly the same
> database. more over, the database was created in my
> new red hat 7.3 server by using "pg_dumpall" from my
> old server (red hat 7.2).
>
>
> Can anybody tell me what's going on ?

Well, to fix it, you'll probably need to double quote
timestamp. Timestamp(...) used to be a call to the
type conversion function but is now the specification
of a timestamp type with a given precision (which I
think matches spec). You might want to consider seeing
if you can do the type conversion using the standard
SQL cast in any case.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2002-07-18 17:10:26 Re: new to Linux & Postgresql
Previous Message Andy Ruhl 2002-07-18 16:46:19 Re: Tape/DVD Backup Suggestions?