Re: proposal: simple date constructor from numeric values

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: simple date constructor from numeric values
Date: 2013-07-03 15:50:30
Message-ID: CADxJZo3a60gTae6VF0VxXcLV97jmOogL+yxxQ-x5c4mD=qbkjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 July 2013 21:41, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-07-03 15:51:35 Re: Add regression tests for ROLE (USER)
Previous Message Andres Freund 2013-07-03 15:44:23 Re: refresh materialized view concurrently