iCyberon / pg_hashids

Short unique id generator for PostgreSQL, using hashids
MIT License
287 stars 25 forks source link

This is great but not usable in hosted environments #9

Closed timuckun closed 6 years ago

timuckun commented 7 years ago

Would it be possible to write a pure PL-PGSQL version of this code?

iCyberon commented 7 years ago

@timuckun, it should be possible to create in pgsql, but I don't have any plans to rewrite in the near future. Anyway, what's the most important/needed feature you would like to see in pgsql version (besides hashing of course)? P.S. There is also plv8 implementation, though I think you know about that.

timuckun commented 7 years ago

For me the appeal is to be able to use on Amazon RDS. I do know about the PlV8 version but there seems to be some aberration there because I can't decode the hashids encoded with plv8 with ruby.

tim-phillips commented 6 years ago

Of note, the plv8 implementation won't work on RDS as the master user does not have permission to set parameter plv8.start_proc.

ALTER DATABASE db_name SET plv8.start_proc = 'load_hashids';

ERROR: permission denied to set parameter "plv8.start_proc"

timuckun commented 6 years ago

I was working on a plpgsql version of hashids but I put it aside. Maybe I should pick it up again. I was almost done with it.

On Tue, 21 Nov 2017 at 9:59 PM, Tim Phillips notifications@github.com wrote:

Of note, the plv8 implementation won't work on RDS as the master user does not have permission to set parameter plv8.start_proc.

ALTER DATABASE db_name SET plv8.start_proc = 'load_hashids';

ERROR: permission denied to set parameter "plv8.start_proc"

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iCyberon/pg_hashids/issues/9#issuecomment-345959541, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGMtyLIlBPWfQpQ26rRHgBxC-jXRDujks5s4pDhgaJpZM4OiEAm .

ashok-sc commented 6 years ago

Is this still not working on AWS RDS?

andreystepanov commented 6 years ago

I have implemented PL/pgSQL version which you can use in hosted environments such as AWS RDS:

https://github.com/andreystepanov/hashids.sql