pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: bz@mailinator.com, PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text
Date: Mon, 15 Jun 2015 23:35:12 -0400
Message-ID: <598.1434425712@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.DEB.2.10.1506152026520.26470@sto>
References: <20150614155912.2732.93270@wrigleys.postgresql.org>
	<42501.1434389175@sss.pgh.pa.us>
	<alpine.DEB.2.10.1506152026520.26470@sto>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Fabien COELHO <coelho@cri.ensmp.fr> writes:
>>> I have a table containing ISBNs stored as the isbn type provided by the isn
>>> extension. In certain cases an ISBN in ISBN10 form is considered unequal to
>>> the same ISBN in ISBN13 form.

> So I would say there is no bug as the number are indeed different, or that 
> I missed something.

I think this definitely indicates a bug:

regression=# select '9791020902573'::isbn;
     isbn      
---------------
 10-209-0257-4
(1 row)

regression=# select '10-209-0257-4'::isbn;
     isbn      
---------------
 1-02-090257-4
(1 row)

I don't mind if '9791020902573' gets converted to something canonical,
but surely the canonical value ought to reproduce without further change.

Furthermore,

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 have no idea which of these forms should be considered valid or
canonical, but surely the two behaviors exhibited above are wrong.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (26+ messages)  latest in thread

Message-ID: <598.1434425712@sss.pgh.pa.us>
Permalink:  ../598.1434425712@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/598.1434425712@sss.pgh.pa.us

 · 

reply

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, coelho@cri.ensmp.fr
  Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text
  In-Reply-To: <598.1434425712@sss.pgh.pa.us>
  References: <20150614155912.2732.93270@wrigleys.postgresql.org> <42501.1434389175@sss.pgh.pa.us> <alpine.DEB.2.10.1506152026520.26470@sto> <598.1434425712@sss.pgh.pa.us>

* 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