From: Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>
To: pgsql-sql@postgresql.org
Subject: Re: EPOCH TIMESTAMP Conversion Problem
Date: Tue, 1 Jan 2008 15:28:37 +0100
Message-ID: <20080101142837.GA24772@apartia.fr> (raw)
In-Reply-To: <16805.1194449708@sss.pgh.pa.us>
References: <7e7750290711070237x7da14616i383ace7f513f0882@mail.gmail.com>
<16805.1194449708@sss.pgh.pa.us>
On Wed, Nov 07, 2007 at 10:35:08AM -0500, Tom Lane wrote:
> "Amitanand Chikorde" <amit99rs@gmail.com> writes:
> > I want to convert MAX(mydate) from myTable to Epoch.
>
> Do you mean
> SELECT EXTRACT(EPOCH FROM MAX(mydate)) FROM myTable
Is using casts for the same purpose deprecated?
SELECT current_date::timestamp::abstime::int4;
Or less efficient?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: vindex+lists-pgsql-sql@apartia.org
Subject: Re: EPOCH TIMESTAMP Conversion Problem
In-Reply-To: <20080101142837.GA24772@apartia.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox