Re: numeric_to_number() function skipping some digits

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: numeric_to_number() function skipping some digits
Date: 2009-09-18 20:22:09
Message-ID: 37ed240d0909181322o173959f9j5cdb22181c9b0cb4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/9/19 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Should we have it throw an error if the input corresponding to a G
> symbol doesn't match the expected group separator?  I'm concerned that
> that would break applications that work okay today.
>

It would be a substantial change to the behaviour, and to do it
properly we'd have to change to_date() to actually parse separator
characters as well.

That is, you can currently write to_date('2009/09/19', 'YYYY-MM-DD')
-- it doesn't matter what the separator characters actually look like,
since per the format pattern they cannot affect the date outcome.

This naturally leads to the question we always have to ask with these
functions: What Does Oracle Do?

But FWIW, a -1 from me for changing this.

Cheers,
BJ

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-09-18 20:26:15 Re: updated join removal patch
Previous Message Dimitri Fontaine 2009-09-18 20:21:36 Re: Anonymous code blocks (was: Re: GRANT ON ALL IN schema)