Skip to content

Native transformations between numerals and int #2

@mkgrgis

Description

@mkgrgis

Feature requests

  1. Now there is only select roman_in(to_char(generate_series(0, 10001), '99999')::cstring) transformation. What about roman_in(smallint) or roman_in(int)?

  2. If there is unicode-encoding (see some constants here) what about ↁ = 5000, ↂ = 10000, ↇ = 50000, ↈ = 100000 for input and output? Also there is less compact forms IƆƆ = 5000, CCIƆƆ = 10000, IƆƆƆ = 50000, CCCIƆƆƆ = 100000 at least for input.
    Note: unfortunately SELECT 'ↈ'::roman is incorrect now.

  3. In Unicode also there is special roman forms

U+2160 | Ⅰ 2160 | Ⅴ 2164 | Ⅹ 2169 | Ⅼ 216C | Ⅽ 216D | Ⅾ 216E | Ⅿ 216F
U+2170 | ⅰ 2170 | ⅴ 2174 | ⅹ 2179 | ⅼ 217C | ⅽ 217D | ⅾ 217E | ⅿ 217F
U+2180 | ↀ 2180 | ↁ 2181 | ↂ 2182 | Ↄ 2183 | ↅ 2185 | ↆ 2186 | ↇ 2187 | ↈ 2188

But it's incorrect input now: SELECT 'Ⅹ'::roman. What about support of this forms at least for input?

  1. Cast functions to smallint and int. There is internal numeric presentation, but no output.

Note: I comes with postgresql-numeral package from PGDG apt sever. Thanks for usefully SQL utility!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions