From: bz@mailinator.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13442: ISBN doesn't always roundtrip with text
Date: Sun, 14 Jun 2015 15:59:12 +0000
Message-ID: <20150614155912.2732.93270@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 13442
Logged by: B.Z
Email address: bz@mailinator.com
PostgreSQL version: 9.4.4
Operating system: Linux think 4.0.0-1-amd64 #1 SMP Debian 4.0.2-1 (2
Description:
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.
Assuming the isn extension is installed:
CREATE TEMP TABLE t(i isbn);
INSERT INTO t VALUES('9791020902573');
SELECT * FROM t WHERE i = '9791020902573'; -- Returns 10-209-0257-4
SELECT * FROM t WHERE i = '10-209-0257-4'; -- Returns 0 rows
SELECT '9791020902573'::isbn = '10-209-0257-4'::isbn; -- Returns f
Other examples of ISBNs with this behavior:
select isbn from isbns where isbn::isbn != isbn::isbn::text::isbn;
isbn
10-91986-01-0
10-91414-02-5
975891300-X
598687008-5
904072556-X
10-209-0257-4
10-209-0014-8
960838204-1
10-91447-03-9
963208937-5
10-209-0011-3
975297291-8
957849470-X
157607283-5
10-93509-00-7
10-209-0014-8
10-209-0273-6
975574374-X
979984511-4
953173635-9
853390230-1
963930301-1
10-223-0179-9
10-209-0141-1
10-209-0041-5
960218202-4
598340069-X
10-91600-01-5
598340069-X
(29 rows)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: bz@mailinator.com
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>
* 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