ISBN (was: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?) - Mailing list pgsql-general

From Peter J. Holzer
Subject ISBN (was: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?)
Date
Msg-id 20220618061126.6cuduzsraj4afjhf@hjp.at
Whole thread Raw
In response to Re: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?  (Bryn Llewellyn <bryn@yugabyte.com>)
Responses Re: ISBN (was: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?)
List pgsql-general
On 2022-06-17 17:14:14 -0700, Bryn Llewellyn wrote:
> "isbn" — string
> values must be unique across the entire set of documents (in other words, it
> defines the unique business key); values must have this pattern:
>
>   « ^[0-9]{3}-[0-9]{1}-[0-9]{2}-[0-9]{6}-[0-9]{1}$ »

Completely off-topic, but this regexp doesn't describe ISBNs. In ISBNs
the three middle subfields are all variable length. The first is a
language code (there are more than 10 languages in the world), the
second identifies the publisher (there are more than 100 publishers) and
the third the book. For example, "Mastering PostgreSQL 9.6" has the ISBN
978-1-78355-535-2.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Bryn Llewellyn
Date:
Subject: Re: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?
Next
From: "Peter J. Holzer"
Date:
Subject: Re: ERROR: failed to find conversion function from key_vals_nn to record[]