GTIN14 support for contrib/isn

Поиск
Список
Период
Сортировка
От Michael Kefeder
Тема GTIN14 support for contrib/isn
Дата
Msg-id 12816d23-4aa4-a4b6-26f8-71bd5eb46200@multiwave.ch
обсуждение исходный текст
Ответы Re: GTIN14 support for contrib/isn
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: string_to_array, array_to_string function without separator
Следующее
От: Mitar
Дата:
Сообщение: Re: Feature: triggers on materialized views