From: | Lucas Brasilino <brasilino(at)recife(dot)pe(dot)gov(dot)br> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Problem with timestamp field/time function.. (upgrading from 7.0 to 7.2.1) |
Date: | 2002-08-20 16:36:33 |
Message-ID: | 3D627011.8000003@recife.pe.gov.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi All:
I've googling around, searching the mailinglist archive and reading FAQ's
but I haven't find the answer for my question. And I know it is quite
commom! I'm trying upgrading to 7.2.1.
I'm running postgresql 7.0 with a column like:
Table "materia"
Column | Type | Modifiers
--------------------+--------------------------+-----------
materiadata | timestamp with time zone | not null
mmateriatitulo | character varying(80) | not null
materiasequencial | numeric(30,6) | not null
I used to execute this query:
select max(time(materiadata)) from materia;
or
select materiasequencial, materiatitulo, time(materiadata)
from materia
order by time(materiadata) desc;
I've read at PostgreSQL 7.3dev Administrator Guide's Release Notes that
time() and timestamp() functions in postgresql 7.2 are deprecated (so in
7.2.1).
So, how can I get the same result above without using time() ??
Or if it not possible, how can I extract (yes, I tried with extract()
function too) time from a timestamp column?
I know it's quite simple question... but I haven't find any clue!
Thanks a lot in advance.
Bests regards
[]'s
Lucas Brasilino
brasilino(at)recife(dot)pe(dot)gov(dot)br
http://www.recife.pe.gov.br
Emprel - Empresa Municipal de Informatica (pt_BR)
Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2002-08-20 17:03:54 | Re: Problem with timestamp field/time function.. (upgrading |
Previous Message | Mathieu Arnold | 2002-08-20 15:34:10 | Re: sql subqueries problem |