Re: Is this a bug ?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Is this a bug ?
Date: 2019-10-23 16:40:20
Message-ID: eb569a00-fcdd-7aef-7500-b924ba9d8205@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/23/19 9:30 AM, Ron wrote:
> On 10/23/19 11:27 AM, Geoff Winkless wrote:
>> On Wed, 23 Oct 2019 at 17:20, Geoff Winkless <pgsqladmin(at)geoff(dot)dj> wrote:
>>> For what it's worth, I can see a value to having
>>>
>>> SELECT 'this is quite a long string'
>>>                 'which I've joined together '
>>>                 'across multiple lines';
>>>
>>> although the advantage of it vs using a concat operator is slim.
>> As an aside, Postgres isn't the only DB to follow the standard here.
>>
>> mysql> select 'hello'
>>      -> ' there';
>> +-------------+
>> | hello       |
>> +-------------+
>> | hello there |
>> +-------------+
>
> This is the kind of weird stuff that we mocked mysql for.
>
> This too would have been roundly mocked if discovered in mysql:
>
> postgres=# select to_date('2018150X','YYYYMMDD');
>   to_date
> ------------
>  2019-03-03
> (1 row)
>
>

As of v10 it does not work in Postgres either:

test_(postgres)# select version();

version

----------------------------------------------------------------------------------------------------------------------------

PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux)
7.4.1 20190424 [gcc-7-branch revision 270538], 64-bit

(1 row)

test_(postgres)# select to_date('2018150X','YYYYMMDD');
ERROR: date/time field value out of range: "2018150X"

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabio Ugo Venchiarutti 2019-10-23 16:51:16 Re: Is this a bug ?
Previous Message Adrian Klaver 2019-10-23 16:31:51 Re: date function bug