]> granicus.if.org Git - postgresql/commit
Fix output of ISBN-13 numbers beginning with 979.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 2 Aug 2015 19:12:33 +0000 (22:12 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 2 Aug 2015 19:12:51 +0000 (22:12 +0300)
commit2d19a0e977080713bd7bb370b20a0025fba6c794
tree18833755ed57b4f933e480503640588e136252bf
parentf1e84d3ebd6062f5bb25cdc7017be1ffa3364f49
Fix output of ISBN-13 numbers beginning with 979.

An EAN beginning with 979 (but not 9790 - those are ISMN's) are accepted
as ISBN numbers, but they cannot be represented in the old, 10-digit ISBN
format. They must be output in the new 13-digit ISBN-13 format. We printed
out an incorrect value for those.

Also add a regression test, to test this and some other basic functionality
of the module.

Patch by Fabien Coelho. This fixes bug #13442, reported by B.Z. Backpatch
to 9.1, where we started to recognize ISBN-13 numbers.
contrib/isn/Makefile
contrib/isn/expected/isn.out [new file with mode: 0644]
contrib/isn/isn.c
contrib/isn/sql/isn.sql [new file with mode: 0644]