Skip to content

Instantly share code, notes, and snippets.

@KWKdesign
Created January 10, 2015 23:06
Show Gist options
  • Save KWKdesign/4a758afbcd1737c041de to your computer and use it in GitHub Desktop.
Save KWKdesign/4a758afbcd1737c041de to your computer and use it in GitHub Desktop.
Postgres ROT13
create or replace function pg_temp.rot13( string text )
returns text as $rot13$
begin
return translate( string, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm' );
end $rot13$ language plpgsql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment