Created
November 30, 2014 03:22
-
-
Save HotFusionMan/ac7465a76bf90ac70b39 to your computer and use it in GitHub Desktop.
PostgreSQL PL/pgSQL implementation of XOR
This file contains 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 XOR(boolean, boolean) RETURNS boolean as $$ BEGIN RETURN ($1 and not $2) OR (not $1 and $2); END; $$ LANGUAGE 'plpgsql'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment