Created
September 13, 2011 14:42
-
-
Save wyanez/1213966 to your computer and use it in GitHub Desktop.
Función que permite hacer el cast implicito de int a char en postgres 9
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 FUNCTION int_to_text(INT4) RETURNS TEXT AS ' | |
| SELECT textin(int4out($1)); | |
| ' LANGUAGE SQL STRICT IMMUTABLE; | |
| CREATE CAST (INT4 AS TEXT) | |
| WITH FUNCTION int_to_text(INT4) | |
| AS IMPLICIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment