Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 139106322A1 for ; Sun, 13 Jun 2010 12:58:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 09714-03 for ; Sun, 13 Jun 2010 15:58:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 020D8632196 for ; Sun, 13 Jun 2010 12:58:28 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o5DFwOCk014337; Sun, 13 Jun 2010 11:58:24 -0400 (EDT) To: Magnus Hagander cc: David Jarvis , Heikki Linnakangas , pgsql-performance Subject: Re: Analysis Function In-reply-to: References: <4C119B3E.3090608@squeakycode.net> <12241.1276287655@sss.pgh.pa.us> <4C14746F.9050603@enterprisedb.com> <14107.1276443739@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Sun, 13 Jun 2010 17:49:50 +0200" Date: Sun, 13 Jun 2010 11:58:24 -0400 Message-ID: <14336.1276444704@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/234 X-Sequence-Number: 39090 Magnus Hagander writes: > On Sun, Jun 13, 2010 at 17:42, Tom Lane 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. 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. > And a third, construct_time(), no? Yeah, maybe ... do you think there's any demand for it? regards, tom lane