Re: Analysis Function

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Analysis Function
Дата
Msg-id AANLkTik5qoLZUtGnakVXIYUTHZoOTYvLlHqBFY-w2GaB@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Analysis Function  (David Jarvis <thangalin@gmail.com>)
Ответы Re: Analysis Function  (David Jarvis <thangalin@gmail.com>)
Re: Analysis Function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Sun, Jun 13, 2010 at 21:19, David Jarvis <thangalin@gmail.com> wrote:
> Hi,
>
>> It's not immediately obvious what the default value of "timezone"
>> will be?
>
> The system's locale, like now(); documentation can clarify.
>
> By named parameter, I meant default value. You could construct a timestamp
> variable using:
>
>   construct_timestamp( year := 1900, hour := 1 )
>
> When I read that code, the first thing I think it should return is:
>
>   1900-01-01 01:00:00.0000-07
>
> I agree construct_timestamp( hour := 1 ) and construct_date() are errors:
> year is required.

Does it make sense to allow minutes when hours isn't specified? Or
should we simply say that for each of the date and the time part, to
specify at <level n> you need to have everything from the top up to
<level n-1> specified? E.g. month requires year to be specified, day
requires both year and month etc?


> I prefer to_timestamp and to_date over the more verbose construct_timestamp.

Yeah, I agree with that.

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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Analysis Function
Следующее
От: AI Rumman
Дата:
Сообщение: query tuning help