Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3C5934759B0 for ; Thu, 22 Aug 2002 07:49:13 -0400 (EDT) Received: from pcr.recife.pe.gov.br (unknown [200.249.133.130]) by postgresql.org (Postfix) with ESMTP id 1C84B4759A1 for ; Thu, 22 Aug 2002 07:49:12 -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 g7MBg9F14845 for ; Thu, 22 Aug 2002 08:42:09 -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 g7MBg5f14796; Thu, 22 Aug 2002 08:42:07 -0300 Message-ID: <3D64CEFF.1090609@recife.pe.gov.br> Date: Thu, 22 Aug 2002 08:46:07 -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: Stephan Szabo Cc: pgsql-sql@postgresql.org Subject: Re: Problem with timestamp field/time function.. (upgrading References: <20020820100127.S43175-100000@megazone23.bigpanda.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/310 X-Sequence-Number: 9156 Hi Stephan >> 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! >> > > In general you could probably use CAST(materiadata as time) I'd guess. > I believe that at this point you can still use the functions, you just > need to double quote them ("time"(materiadata)) to differentiate them > from the type specifiers. > Well, it seems to work only with "timestamp without time zone" type. But worked. Thanks a lot. For me it's a new approching not using functions such as time, but "casting" it to a "time" type ( like select materiadata::time from materia;). If PostgreSQL development group change it's point of view, I suppose there's some advantage. Do you know some advantages ?? 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