Re: extracting from epoch values in pgsql - Mailing list pgsql-sql

From Frank Bax
Subject Re: extracting from epoch values in pgsql
Date
Msg-id 4AB2741A.2050409@sympatico.ca
Whole thread Raw
In response to Re: extracting from epoch values in pgsql  (Gavin McCullagh <gavin.mccullagh@gcd.ie>)
List pgsql-sql
Gavin McCullagh wrote:
> On Thu, 17 Sep 2009, Frank Bax wrote:
> 
>> Gavin McCullagh wrote:
>>> SELECT time, to_timestamp(time) AS ts, 
>>> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
>>> ERROR:  syntax error at or near ","
>>> LINE 1: ...t time, to_timestamp(time) AS ts, extract('months',to_times...
>> Try replacing extract('month',value) with extract('months' from value)
> 
> Makes no difference whether month or months:


Sorry; my typo.  You used a comma in "extract" instead of "from".


pgsql-sql by date:

Previous
From: Gavin McCullagh
Date:
Subject: Re: extracting from epoch values in pgsql
Next
From: Craig Ringer
Date:
Subject: Re: Hibernate, web application and only one sequence for all primary keys