Re: proposal: simple date constructor from numeric values - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: proposal: simple date constructor from numeric values
Date
Msg-id CADxJZo3a60gTae6VF0VxXcLV97jmOogL+yxxQ-x5c4mD=qbkjw@mail.gmail.com
Whole thread Raw
In response to Re: proposal: simple date constructor from numeric values  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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 by date:

Previous
From: Andres Freund
Date:
Subject: Re: refresh materialized view concurrently
Next
From: Robert Haas
Date:
Subject: Re: Add regression tests for ROLE (USER)