Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4Y8x-00045x-SU for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jun 2015 17:25:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z4Y8v-0008Je-MN for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jun 2015 17:25:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z4Y8t-0008JV-Q6 for pgsql-bugs@postgresql.org; Mon, 15 Jun 2015 17:25:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z4Y8r-0002Mc-5c for pgsql-bugs@postgresql.org; Mon, 15 Jun 2015 17:25:51 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t5FHPjRk031763; Mon, 15 Jun 2015 13:25:45 -0400 From: Tom Lane To: bz@mailinator.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text In-reply-to: <20150614155912.2732.93270@wrigleys.postgresql.org> References: <20150614155912.2732.93270@wrigleys.postgresql.org> Comments: In-reply-to bz@mailinator.com message dated "Sun, 14 Jun 2015 15:59:12 -0000" Date: Mon, 15 Jun 2015 13:26:15 -0400 Message-ID: <42501.1434389175@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org bz@mailinator.com 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. I poked at this a little bit. I think the issue may be that this bit at line 832 in isn.c: case ISBN: memcpy(buf, "978", 3); supposes that all ISBNs should have prefix 978, whereas your example is using prefix 979, which seems to be also valid according to code a few lines above. I don't know enough about the whole ISBN/EAN mess to understand what this should be doing instead, though. 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