This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE OR REPLACE FUNCTION base36_decode(encoded_text text) | |
| RETURNS bigint AS $$ | |
| declare | |
| k_base constant integer := 36; | |
| k_alphabet constant text := '0123456789abcdefghijklmnopqrstuvwxyz'; | |
| v_encoded_arr text[]; | |
| v_return_result bigint := 0; | |
| v_interim bigint; | |
| v_index integer; | |
| v_token text; |