ksj
ksj · Japanese kanji-numeral integer type with arithmetic, aggregates, casts, comparison, and B-tree indexing
Overview
Usage
Sources:
ksj defines a fixed-length PostgreSQL type whose text form uses Japanese kanji numerals while its internal value is a 32-bit integer. It supplies arithmetic, comparisons, sum, min, max, integer casts, and a B-tree operator class.
The reviewed repository has no user documentation or regression tests, so accepted grammar and output spelling must be established from the C implementation on the exact build. The 32-bit representation also means arithmetic and casts need explicit boundary and overflow tests.
Do not use display text as a stable interchange or collation key. Preserve the original source text when wording matters, and use a core numeric type for calculations, constraints, and external APIs. Treat the ksj B-tree ordering as numeric ordering only after validating negative values, zero, malformed input, dump/restore, and upgrade behavior.