Re: Problem with timestamp field/time function.. (upgrading

From: Lucas Brasilino <brasilino(at)recife(dot)pe(dot)gov(dot)br>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with timestamp field/time function.. (upgrading
Date: 2002-08-22 11:46:07
Message-ID: 3D64CEFF.1090609@recife.pe.gov.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 <sql>select materiadata::time from
materia;</sql>).
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(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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Klimov 2002-08-22 13:34:16 bytea etc.
Previous Message Andreas Tille 2002-08-22 09:46:24 Separating data sets in a table