GTIN14 support for contrib/isn

From: Michael Kefeder <mike(at)multiwave(dot)ch>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: GTIN14 support for contrib/isn
Date: 2019-03-15 16:01:49
Message-ID: 12816d23-4aa4-a4b6-26f8-71bd5eb46200@multiwave.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers,

For a project of ours we need GTIN14 data type support. The isn
extension already supports EAN13, and a '0' prefixed EAN13 is a valid
GTIN14. The leftmost "new" 14th digit is a packaging level indicator
which we need (= using EAN13 and faking a leading 0 in output doesn't
cut it).

Looking at the code I saw every format that isn-extension supports is
stored as an EAN13. Theoretically that can be changed to be GTIN14, but
that would mean quite a lot of rewrite I feared, so I chose to code only
GTIN14 I/O separetely to not interfere with any existing conversion
magic. This yields an easier to understand patch and doesn't touch
existing functionality. However it introduces redundancy to a certain
extent.

Find my patch attached. Please let me know if there are things that need
changes, I'll do my best to get GTIN support into postgresql.

thanks in advance
mike

Attachment Content-Type Size
gtin14.patch text/plain 17.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mitar 2019-03-15 16:15:16 Re: Feature: triggers on materialized views
Previous Message Pavel Stehule 2019-03-15 16:00:54 Re: string_to_array, array_to_string function without separator