Created
December 2, 2015 21:09
-
-
Save yogonza524/45f5284af18a4e56656a to your computer and use it in GitHub Desktop.
Esta funcion devuelve TRUE si la fecha pasada como parametro es mayor a la fecha actual y FALSE en caso contrario
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 compare_fecha_hoy(fecha date) | |
RETURNS BOOLEAN AS $$ | |
DECLARE | |
BEGIN | |
IF (fecha > now()::date) THEN | |
RETURN TRUE; | |
ELSE | |
RETURN FALSE; | |
END IF; | |
END; | |
$$ | |
LANGUAGE PLPGSQL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment