Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4heH-0001CG-Bq for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jun 2015 03:34:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z4heG-0007rk-MF for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jun 2015 03:34:52 +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 1Z4heF-0007rd-P4 for pgsql-bugs@postgresql.org; Tue, 16 Jun 2015 03:34: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 1Z4heC-0005AK-J9 for pgsql-bugs@postgresql.org; Tue, 16 Jun 2015 03:34: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 t5G3YgLk010548; Mon, 15 Jun 2015 23:34:43 -0400 From: Tom Lane To: Fabien COELHO cc: bz@mailinator.com, PostgreSQL Bugs List Subject: Re: BUG #13442: ISBN doesn't always roundtrip with text In-reply-to: References: <20150614155912.2732.93270@wrigleys.postgresql.org> <42501.1434389175@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Mon, 15 Jun 2015 20:34:18 +0200" Date: Mon, 15 Jun 2015 23:35:12 -0400 Message-ID: <598.1434425712@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 Fabien COELHO 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