Re: extract and time zones - Mailing list pgsql-general

From Dennis Gearon
Subject Re: extract and time zones
Date
Msg-id 3F2A84FD.9050601@cvc.net
Whole thread Raw
In response to extract and time zones  (Oscar Estevez Lopez <oestevez@prisacom.com>)
Responses Re: extract and time zones  (Ron Johnson <ron.l.johnson@cox.net>)
Re: extract and time zones  (Oscar Estevez Lopez <oestevez@prisacom.com>)
List pgsql-general
Don't know the answer to your question, but how did you type all those commands in one second? :-)

Oscar Estevez Lopez wrote:

> Um, and what about this?
>
> $ uname -a
> FreeBSD caneli 4.7-RELEASE FreeBSD 4.7-RELEASE #1: Fri May  9 02:30:11 CEST 2003
root@caneli:/usr/obj/usr/src/sys/CANELI i386 
>
> $ psql --version
> psql (PostgreSQL) 7.2.2
> contains support for: readline, history, multibyte
> Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
> Portions Copyright (c) 1996, Regents of the University of California
> Read the file COPYRIGHT or use the command \copyright to see the
> usage and distribution terms.
>
>  create table t1( d timestamp(0) without time zone );
> CREATE
>
>  insert into t1 values( current_timestamp );
> INSERT 26251 1
>
>
>  select * from t1;
>           d
> ---------------------
>  2003-08-01 13:30:38
> (1 row)
>
> select extract( epoch from d ) from t1;
>  date_part
> ------------
>  1059744638
> (1 row)
>
> select extract( epoch from d::timestamp ) from t1;
>  date_part
> ------------
>  1059737438
> (1 row)
>
> d :            1059744638
> d::timestamp : 1059737438
>
> ??
>
> Does 'epoch from d' check time zone and 'epoch from d::timestamp' doesn't?
>
>
>
>
>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug in comment parsing? [was: Re: Comments in .sql files]
Next
From: Dennis Gearon
Date:
Subject: Re: Table Stats