Re: BUG #13442: ISBN doesn't always roundtrip with text - Mailing list pgsql-bugs

From Fabien COELHO
Subject Re: BUG #13442: ISBN doesn't always roundtrip with text
Date
Msg-id alpine.DEB.2.10.1506160728030.26470@sto
Whole thread Raw
In response to Re: BUG #13442: ISBN doesn't always roundtrip with text  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #13442: ISBN doesn't always roundtrip with text
Re: BUG #13442: ISBN doesn't always roundtrip with text
List 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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text