Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 04552475B3B for ; Tue, 20 Aug 2002 12:39:23 -0400 (EDT) Received: from pcr.recife.pe.gov.br (unknown [200.249.133.130]) by postgresql.org (Postfix) with ESMTP id 2A69F4759A1 for ; Tue, 20 Aug 2002 12:39:20 -0400 (EDT) Received: from pcr.recife.pe.gov.br (localhost [127.0.0.1]) by pcr.recife.pe.gov.br (8.11.2/8.11.2) with ESMTP id g7KGWlU13886 for ; Tue, 20 Aug 2002 13:32:47 -0300 Received: from recife.pe.gov.br (proxy.recife.pe.gov.br [200.249.133.135]) by pcr.recife.pe.gov.br (8.11.2/8.11.2) with ESMTP id g7KGWlf13880 for ; Tue, 20 Aug 2002 13:32:47 -0300 Message-ID: <3D627011.8000003@recife.pe.gov.br> Date: Tue, 20 Aug 2002 13:36:33 -0300 From: Lucas Brasilino Organization: Emprel - Empresa Municipal de Informatica User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Problem with timestamp field/time function.. (upgrading from 7.0 to 7.2.1) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/295 X-Sequence-Number: 9141 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@recife.pe.gov.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