Re: proposal: simple date constructor from numeric values

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: proposal: simple date constructor from numeric values
Дата
Msg-id CADxJZo3a60gTae6VF0VxXcLV97jmOogL+yxxQ-x5c4mD=qbkjw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: simple date constructor from numeric values  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 3 July 2013 21:41, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I am thinking so for these functions exists some consensus - minimally
> for function "date"(year, month, int) - I dream about this function
> ten years :)
>
> I am not sure about "datetime":
> a) we use "timestamp" name for same thing in pg
> b) we can simply construct timestamp as sum of date + time, what is
> little bit more practical (for me), because it doesn't use too wide
> parameter list.

I agree.  I've got no issues with using date + time arithmetic to
build a timestamp.

> what do you think about names?
>
> make_date
> make_time

I am fine with those names.  'make', 'construct', 'build', etc. are
all reasonable verbs for what the functions do, but 'make' is nice and
short, and will be familiar to people who've used a 'mktime'.

> I don't would to use to_date, to_time functions, a) because these
> functions use formatted input, b) we hold some compatibility with
> Oracle.

Yes, I agree.

Cheers,
BJ



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: refresh materialized view concurrently
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Add regression tests for ROLE (USER)