Re: Analysis Function

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Jarvis <thangalin(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Analysis Function
Date: 2010-06-14 09:01:47
Message-ID: AANLkTinu31G_D12lk6TH3ecinHqLWOEv7dMtq_tnnwCn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Jun 13, 2010 at 17:58, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> On Sun, Jun 13, 2010 at 17:42, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> ... (We presumably want
>>> timezone to default to the system timezone setting, but I wonder how
>>> we should make that work --- should an empty string be treated as
>>> meaning that?)
>
>> Umm. NULL could be made to mean that, or we could provicde two
>> different versions - one that takes TZ and one that doesn't.
>
> Using NULL like that seems a bit awkward: for one thing it'd mean the
> function couldn't be STRICT, and also it'd be bizarre that only this
> one argument could be null without leading to a null result.

Hmm, yeah.

> And two separate functions isn't good either.  Basically, I think it's
> important that there be a way to specify an explicit parameter value
> that behaves identically to the default.

In that case, empty string seems fairly reasonable - if you look at
the text based parsing, that's what we do if the timezone is an "empty
string" (meaning not specified).

>> And a third, construct_time(), no?
>
> Yeah, maybe ... do you think there's any demand for it?

Yes, I think there is. Plus, it's for completeness :-)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Magnus Hagander 2010-06-14 09:03:37 Re: Analysis Function
Previous Message Robert Haas 2010-06-14 03:47:06 Re: [PERFORM] No hash join across partitioned tables?