YouTube-like Short IDs as Postgres Primary Keys
This fragment: ``` gkey := encode(gen_random_bytes(8), 'base64'); gkey := replace(gkey, '/', '_'); -- url safe replacement gkey := replace(gkey, '+', '-'); -- url safe replacement key := rtrim(gkey, '='); -- cut off padding ``` Could be implemented as another function with parameter `keylen` (defaults to 8). This method allows to use this function in your other inserts, updates - or even change your default gen function for another one - for example with default of 10 bytes or based on uuid with some prefix, sufix.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by qyloxe and has received 1 comments.