Re: proposal: simple date constructor from numeric values

From: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Brendan Jurd <direvus(at)gmail(dot)com>
Subject: Re: proposal: simple date constructor from numeric values
Date: 2013-09-18 06:37:42
Message-ID: CAM2+6=XwFZ6+ktt63qM3O5+CkaM+ZrYBoWpC2T1TY7w97+VeBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Pavel,

I have reviewed your patch.

Patch looks excellent and code changes match with similar constructs
elsewhere. That's great.

However, it was not applying with git apply command but able to apply it
with patch -p1 with some offsets. make and make install was smooth too.
Regression suite didn't complain as expected.

I did my own testing and din't get any issues with that. Code walk-through
was good too.

I was little bit worried as we are allowing 60 for seconds in which case we
are wrapping it to next minute and setting sec to 0. But this logic was not
true for minutes. There we are throwing an error when min = 60.

But I don't blame on this patch as other constructs does same too. Like
"select time '15:60:20'" throws an error where as "select time '15:30:60'"
does not.

However, in attached patch I have fixed the typo identified by Alvaro.

Please have a look before I submit it to the committer.

Thanks

On Sat, Jul 13, 2013 at 5:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>wrote:

> Hello
>
> 2013/7/12 Peter Eisentraut <peter_e(at)gmx(dot)net>:
> > There is a small inconsistency:
> >
> > select time '12:30:57.123456789';
> >
> > gives
> >
> > 12:30:57.123457
> >
> > but
> >
> > select make_time(12, 30, 57.123456789);
> >
> > gives
> >
> > 12:30:57.123456
>
> fixed - see attached patch
>
> Regards
>
> Pavel
>
> >
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

--
Jeevan B Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Phone: +91 20 30589500

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.

Attachment Content-Type Size
make_date_v4.patch application/octet-stream 8.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2013-09-18 07:02:40 Re: Minmax indexes
Previous Message Amit Kapila 2013-09-18 06:25:24 Re: [RFC] Extend namespace of valid guc names