Closed gpip closed 6 years ago
I see the code is using PG_GETARG_INT32
for the id, shouldn't that be at least INT64 instead?
@gpip Does this work for you?
select id_encode(ARRAY[1981515714898], 'salt1', 6, 'ABCDEFGHJKLMNPRSTVXYZ');
select id_decode('XXAJGNGVJEBX', 'salt1', 6, 'ABCDEFGHJKLMNPRSTVXYZ');
It should work, I'll fix the issue.
@gpip Just pushed v1.2.1, should work with BIGINT. Let me know if you encounter other issues.
Thank you for the fix! Earlier I recompiled it with INT64, haven't tried using ARRAY but looks fine to me
Hey, I was just trying this extension with Postgres 10 and found something odd:
The python hashid module returns 'XXAJGNGVJEBX' (and not 'XDMNVNJPBP'), and if I pass that value to
id_decode
I get back the expected id 1981515714898