Re: BUG #13442: ISBN doesn't always roundtrip with text

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: bz(at)mailinator(dot)com, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text
Date: 2015-06-16 05:37:21
Message-ID: alpine.DEB.2.10.1506160728030.26470@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


> I think this definitely indicates a bug:
>
> regression=# select '9791020902573'::isbn;
> isbn
> ---------------
> 10-209-0257-4
> (1 row)

Yes, indeed, this one is definitely a bug.

> regression=# select '9791020902573'::isbn = '10-209-0257-4'::isbn;
> ?column?
> ----------
> f
> (1 row)
>
> so apparently the canonicalization conversion wasn't right to begin with.

I still do not get it, "False" is expected on this last one, as this is
not the same book.

> I have no idea which of these forms should be considered valid or
> canonical, but surely the two behaviors exhibited above are wrong.

I think that it is only the first one, i.e. converting the ISBN13 code
beginning with 979 to a ISBN10 should have raised an exception.

--
Fabien.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2015-06-16 06:09:17 Re: BUG #13442: ISBN doesn't always roundtrip with text
Previous Message Tom Lane 2015-06-16 03:35:12 Re: BUG #13442: ISBN doesn't always roundtrip with text