Re: patch: make_timestamp function

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: make_timestamp function
Date: 2013-12-13 13:37:58
Message-ID: CAFcNs+qomxpLLYiX3xAdJwd7zGRjCs3news2RhwHEkdvRfOkqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 13, 2013 at 7:09 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2013-12-13 13:41:17 [bug fix] multibyte messages are displayed incorrectly on the client
Previous Message David Rowley 2013-12-13 13:33:46 Re: logical changeset generation v6.8