From: Fabio Ugo Venchiarutti <f.venchiarutti@ocado.com>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Is this a bug ?
Date: Wed, 23 Oct 2019 17:51:16 +0100
Message-ID: <d5a3175c-a275-c02a-1a31-42b2dcafb802@ocado.com> (raw)
In-Reply-To: <98b7422b-7ee6-03b5-2312-cd310b763747@gmail.com>
References: <6048315C-CE0E-482F-9F48-B300E4D7AC52@aol.com>
<CAEzk6fdPCjF0HkbL_8NMRQHKR2k_sRNCAc67jeqBQMO0hTU3xQ@mail.gmail.com>
<9df3ba0d-974d-f13d-ec91-bc22c3ab362b@gmail.com>
<24295.1571846414@sss.pgh.pa.us>
<a2122ac3-2aaf-d69a-bdc8-e9bf0c7b5b55@gmail.com>
<CAEzk6fejkodG2RCY9kjeD=a+X9+-iD4h5tSL576n529rNwFs8Q@mail.gmail.com>
<CAEzk6ffCOE06qJg7GaKhn_9kq4i6nfOte2_C4vW3U6iz1L_ayg@mail.gmail.com>
<98b7422b-7ee6-03b5-2312-cd310b763747@gmail.com>
On 23/10/2019 17:30, Ron wrote:
> On 10/23/19 11:27 AM, Geoff Winkless wrote:
>> On Wed, 23 Oct 2019 at 17:20, Geoff Winkless <pgsqladmin@geoff.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)
>
>
The main difference being that we mocked MySQL because it BROKE the
standard requirements in bespoke, arguably lazy/stupid/dangerous ways
(and often undocumented as a result).
You ran into a gotcha of the SQL specification; in your shoes I'd
instead appreciate the fact that the PG maintainers went out of their
way and documented this spec weirdness as such in their own project when
they could have just went "look into the specification for oddities".
MySQL silently truncated your overflowing string for years without as
much as a warning, by default. In my book that broke specification, rule
of least surprise, data safety and a lot more.
--
Regards
Fabio Ugo Venchiarutti
OSPCFC Network Engineering Dpt.
Ocado Technology
--
Notice:
This email is confidential and may contain copyright material of
members of the Ocado Group. Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the members of the
Ocado Group.
If you are not the intended recipient, please notify us
immediately and delete all copies of this message. Please note that it is
your responsibility to scan this message for viruses.
References to the
"Ocado Group" are to Ocado Group plc (registered in England and Wales with
number 7098618) and its subsidiary undertakings (as that expression is
defined in the Companies Act 2006) from time to time. The registered office
of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way,
Hatfield, Hertfordshire, AL10 9UL.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: f.venchiarutti@ocado.com, ronljohnsonjr@gmail.com
Subject: Re: Is this a bug ?
In-Reply-To: <d5a3175c-a275-c02a-1a31-42b2dcafb802@ocado.com>
References: <6048315C-CE0E-482F-9F48-B300E4D7AC52@aol.com> <CAEzk6fdPCjF0HkbL_8NMRQHKR2k_sRNCAc67jeqBQMO0hTU3xQ@mail.gmail.com> <9df3ba0d-974d-f13d-ec91-bc22c3ab362b@gmail.com> <24295.1571846414@sss.pgh.pa.us> <a2122ac3-2aaf-d69a-bdc8-e9bf0c7b5b55@gmail.com> <CAEzk6fejkodG2RCY9kjeD=a+X9+-iD4h5tSL576n529rNwFs8Q@mail.gmail.com> <CAEzk6ffCOE06qJg7GaKhn_9kq4i6nfOte2_C4vW3U6iz1L_ayg@mail.gmail.com> <98b7422b-7ee6-03b5-2312-cd310b763747@gmail.com> <d5a3175c-a275-c02a-1a31-42b2dcafb802@ocado.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox