From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: patch: make_timestamp function |
Date: | 2013-12-13 18:17:32 |
Message-ID: | CAFcNs+qkHGpiLi2p5DmGuaxkHpbV-ASpR3K0fw+oLrNfKuQpag@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Dec 13, 2013 at 3:53 PM, Martijn van Oosterhout <kleptog(at)svana(dot)org>
wrote:
>
> On Thu, Dec 12, 2013 at 08:50:26PM -0200, Fabrízio de Royes Mello wrote:
> > On Thu, Dec 12, 2013 at 3:11 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com
>wrote:
> >
> > > Hello
> > >
> > > this patch try to complete a set of functions make_date and
make_timestamp.
> > >
> > >
> > Could we have the 'make_timestamptz' function too?
>
> Wouldn't this just be:
>
> SELECT make_timestamp(...) at time zone 'foo';
>
> (assuming make_timestamp actually returns a timestamp and not a
> timestamptz).
>
> or do you mean something else?
>
Your example will convert the timestamp into time zone defined by 'at time
zone...'.
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.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2013-12-13 18:24:03 | Re: autovacuum_work_mem |
Previous Message | Andres Freund | 2013-12-13 18:15:51 | Re: "stuck spinlock" |