Converting a timestamp to a time - Mailing list pgsql-general

From Mark Morgan Lloyd
Subject Converting a timestamp to a time
Date
Msg-id 454DA4B3.5A6F4B49@telemetry.co.uk
Whole thread Raw
Responses Re: Converting a timestamp to a time
List pgsql-general
I'm in the middle of moving a production database from 7.1 to 8.1 and have hit a
slight problem.

On the old system I've got a query including

datastamp AS datastamp, date(datastamp ) as datadate,
time(datastamp ) as datatime, status,  -- etc.

This is actually generated on the client to possibly include timezone
correction. Obviously this has worked fine for a number of years on 7.1, but 8.1
is objecting to the time() cast.

What is the correct (or even any :-) way of converting a timestamp into a time
(without timezone etc.)?

Any suggestions would be much appreciated.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

pgsql-general by date:

Previous
From: Ben
Date:
Subject: Re: opening a channel between two postgreSQL-servers?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: explosion of tiny tables representing multiple