BEGIN; CREATE EXTENSION IF NOT EXISTS anon CASCADE; SELECT anon.init(); init ------ t (1 row) -- hex_to_int SELECT anon.hex_to_int(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.hex_to_int('000000') = 0; ?column? ---------- t (1 row) SELECT anon.hex_to_int('123456') = 1193046; ?column? ---------- t (1 row) SELECT anon.hex_to_int('ffffff') = 16777215; ?column? ---------- t (1 row) -- projection_to_oid SELECT anon.projection_to_oid(NULL,NULL,NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.projection_to_oid('abcdefgh','', 10000) = 9096; ?column? ---------- t (1 row) SELECT anon.projection_to_oid('xxxxxxxx','yyyyy', 10000) = 9784; ?column? ---------- t (1 row) -- First Name SELECT anon.pseudo_first_name(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_first_name('bob') = anon.pseudo_first_name('bob'); ?column? ---------- t (1 row) SELECT anon.pseudo_first_name('bob','123salt*!') = anon.pseudo_first_name('bob','123salt*!'); ?column? ---------- t (1 row) SELECT pg_typeof(anon.pseudo_first_name(NULL)) = 'TEXT'::REGTYPE; ?column? ---------- t (1 row) -- Last Name SELECT anon.pseudo_last_name(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_last_name('bob','x') = anon.pseudo_last_name('bob','x'); ?column? ---------- t (1 row) -- Email SELECT anon.pseudo_email(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_email('bob','x') = anon.pseudo_email('bob','x'); ?column? ---------- t (1 row) -- City SELECT anon.pseudo_city(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_city('bob','x') = anon.pseudo_city('bob','x'); ?column? ---------- t (1 row) -- Region SELECT anon.pseudo_region(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_region('bob','x') = anon.pseudo_region('bob','x'); ?column? ---------- t (1 row) -- Country SELECT anon.pseudo_country(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_country('bob','x') = anon.pseudo_country('bob','x'); ?column? ---------- t (1 row) -- Company SELECT anon.pseudo_company(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_company('bob','x') = anon.pseudo_company('bob','x'); ?column? ---------- t (1 row) -- IBAN SELECT anon.pseudo_iban(NULL) IS NULL; ?column? ---------- t (1 row) SELECT anon.pseudo_iban('bob','x') = anon.pseudo_iban('bob','x'); ?column? ---------- t (1 row) -- Use a predefined secret salt SELECT anon.set_secret_salt('a_VeRy_SeCReT_SaLT'); set_secret_salt -------------------- a_VeRy_SeCReT_SaLT (1 row) SELECT anon.pseudo_last_name('bob') = 'Tribley'; ?column? ---------- t (1 row) ROLLBACK;