Open mkgrgis opened 1 year ago
Hi,
bigint
, and rely on casts from the other numeric types. When implicit casts don't work, use explicit casts:create table r (n smallint);
insert into r values (1);
select n::roman from r;
FEHLER: 42846: kann Typ smallint nicht in Typ roman umwandeln
select n::bigint::roman from r;
n
───
I
interesting, I didn't know these symbols yet. Will consider that the next time I touch the extension.
use type casts.
Thanks, @df7cb !
select generate_series(0, 10001)::bigint::roman
works fine, but more SQL:2016 compatible is direct functions for int
and smallint
. Will it hard for You to add this functions by bigint
example? Maybe select generate_series(0, 10001)::bigint::roman
will be interesting as example in documentation / README ?select r::bigint from t
works, but also more SQL:2016 compatible are direct casts to int
and smallint
. Will it hard for You to add this functions by bigint
example? My notes about int
and smallint
in context SQL:2016 are also applicable to zahl
and numeral
.
Feature requests
Now there is only
select roman_in(to_char(generate_series(0, 10001), '99999')::cstring)
transformation. What aboutroman_in(smallint)
orroman_in(int)
?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.In Unicode also there is special roman forms
But it's incorrect input now:
SELECT 'Ⅹ'::roman
. What about support of this forms at least for input?Cast functions to
smallint
andint
. There is internal numeric presentation, but no output.Note: I comes with
postgresql-numeral
package from PGDG apt sever. Thanks for usefully SQL utility!