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

From Pavel Stehule
Subject Re: patch: make_timestamp function
Date
Msg-id CAFj8pRBRH3S9yWpmOpNYtAyriJjODGLd2eYEjfyYWFBMehoc8A@mail.gmail.com
Whole thread Raw
In response to Re: patch: make_timestamp function  (Jim Nasby <jim@nasby.net>)
Responses Re: patch: make_timestamp function
Re: patch: make_timestamp function
List pgsql-hackers
Hello


2013/12/13 Jim Nasby <jim@nasby.net>
On 12/13/13 1:49 PM, Fabrízio de Royes Mello wrote:

On Fri, Dec 13, 2013 at 5:35 PM, Tom Lane <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote:

 >
 > Fabrízio de Royes Mello <fabriziomello@gmail.com <mailto:fabriziomello@gmail.com>> writes:
 > > I think the goal of the "make_date/time/timestamp" function series is build
 > > a date/time/timestamp from scratch, so the use of 'make_timestamptz' is to
 > > build a specific timestamp with timezone and don't convert it.
 >
 > Yeah; we don't really want to incur an extra timezone rotation just to get
 > to a timestamptz.  However, it's not clear to me if make_timestamptz()
 > needs to have an explicit zone parameter or not.  It could just assume
 > that you meant the active timezone.
 >

+1. And if you want a different timezone you can just set the 'timezone' GUC.

Why wouldn't we have a version that optionally accepts the timezone? That mirrors what you can currently do with a cast from text, and having to set the GUC if you need a different TZ would be a real PITA.

It is not bad idea.

What will be format for timezone in this case? Is a doble enough?

last version of this patch attached (without overloading in this moment)


 
--
Jim C. Nasby, Data Architect                       jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net

Attachment

pgsql-hackers by date:

Previous
From: Ants Aasma
Date:
Subject: Re: [PATCH] Negative Transition Aggregate Functions (WIP)
Next
From: James Cloos
Date:
Subject: Re: SSL: better default ciphersuite