Re: Analysis Function

From: David Jarvis <thangalin(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 11:10:41
Message-ID: AANLkTimBhddEQUyeAeiYdoHNbE81LJwck0eAHCY9Mutg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
> Does it make sense to allow minutes when hours isn't specified? Or
>

For time, 00 seems a reasonable default for all values; clearly document the
defaults. Also, having a default makes the code simpler than <level n> plus
<level n-1>. (Not to mention explaining it.) ;-)

SELECT to_timestamp( minutes := 19 ) -- error (year not specified)
SELECT to_timestamp( year := 2000, minutes := 19 ) -- 2000-01-01
00:19:00.0000-07

Dave

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2010-06-14 11:14:27 Re: Command Prompt 8.4.4 PRMs compiled with debug/assert enabled
Previous Message AI Rumman 2010-06-14 10:41:26 query tuning help