pgcrockford: Crockford Base 32 encoding for unsigned ints

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема pgcrockford: Crockford Base 32 encoding for unsigned ints
Дата
Msg-id 0CDD260B-17EF-4907-8D17-59171F082144@seespotcode.net
обсуждение исходный текст
Список pgsql-announce
The pgcrockford extension provides Base 32 encoded integers as a
PostgreSQL base type. From [Douglas Crockford's
requirements][crockford] for the specification, the encoding should

> - Be human readable and machine readable.
> - Be compact. Humans have difficulty in manipulating long strings of arbitrary symbols.
> - Be error resistant. Entering the symbols must not require keyboarding gymnastics.
> - Be pronounceable. Humans should be able to accurately transmit the symbols to other humans using a telephone.

[crockford]: https://www.crockford.com/base32.html

The motivation for pgcrockford is to provide a more humane display of
values used for surrogate keys while preserving space efficiency:
crockford values are represented as alpha-numeric strings while using
unsigned integers for their implementation.


A quick example:

select 'POSTGRESQL'::crockford8, 'POSTGRESQL'::crockford8::int8;
 crockford8 |      int8
------------+-----------------
 P0STGRESQ1 | 774943659222753
(1 row)


https://github.com/grzm/pgcrockford

Cheers!

Michael Glaesemann
grzm seespotcode net






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

Предыдущее
От: David Fetter
Дата:
Сообщение: == PostgreSQL Weekly News - September 8, 2019 ==
Следующее
От: Pavan Deolasee
Дата:
Сообщение: PGConf India 2020: Call for Papers