Re: patch: make_timestamp function - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: patch: make_timestamp function
Date
Msg-id CAFcNs+qomxpLLYiX3xAdJwd7zGRjCs3news2RhwHEkdvRfOkqQ@mail.gmail.com
Whole thread Raw
In response to Re: patch: make_timestamp function  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers

On Fri, Dec 13, 2013 at 7:09 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> I though about it. Then there are two questions
>
> a) Could we have a make_timetz function?
>
> b) What type we use for timezone?
>


I just think in a function that returns the timestamp with timezone based on the current 'timezone' setting.

fabrizio=# show timezone;
  TimeZone  
-------------
 Brazil/East
(1 row)

fabrizio=# select '2013-12-13 11:29:45.786937'::timestamptz;
          timestamptz         
-------------------------------
 2013-12-13 11:29:45.786937-02
(1 row)

fabrizio=# set timezone to 'UTC';
SET
fabrizio=# select '2013-12-13 11:29:45.786937'::timestamptz;
          timestamptz         
-------------------------------
 2013-12-13 11:29:45.786937+00
(1 row)

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: logical changeset generation v6.8
Next
From: "MauMau"
Date:
Subject: [bug fix] multibyte messages are displayed incorrectly on the client