Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4E4A46328B5 for ; Sun, 13 Jun 2010 12:34:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 74695-06 for ; Sun, 13 Jun 2010 15:34:25 +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 2F76F6322A1 for ; Sun, 13 Jun 2010 12:34:25 -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 o5DFYKmm013999; Sun, 13 Jun 2010 11:34:20 -0400 (EDT) To: Heikki Linnakangas cc: David Jarvis , pgsql-performance@postgresql.org, Magnus Hagander Subject: Re: Analysis Function In-reply-to: <4C14746F.9050603@enterprisedb.com> References: <4C119B3E.3090608@squeakycode.net> <12241.1276287655@sss.pgh.pa.us> <4C14746F.9050603@enterprisedb.com> Comments: In-reply-to Heikki Linnakangas message dated "Sun, 13 Jun 2010 09:02:23 +0300" Date: Sun, 13 Jun 2010 11:34:20 -0400 Message-ID: <13998.1276443260@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/231 X-Sequence-Number: 39087 Heikki Linnakangas writes: > We could have a function like: > construct_timestamp(year int4, month int4, date int4, hour int4, minute > int4, second int4, milliseconds int4, timezone text) This fails to allow specification to the microsecond level (and note that with float timestamps even smaller fractions have potential use). I would suggest dropping the milliseconds argument and instead letting the seconds arg be float8. That seems a closer match to the way people think about the textual representation. > Now that we have named parameter notation, callers can use it to > conveniently fill in only the fields needed: It's not immediately obvious what the default value of "timezone" will be? regards, tom lane