Created
June 27, 2018 02:14
-
-
Save abelcallejo/897c7adedb77f7e2dbd60c362a531d98 to your computer and use it in GitHub Desktop.
Creating a user-defined PostgreSQL function
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 function_name_here(character varying) RETURNS text AS $$ | |
SELECT column_name FROM "TABLE_NAME" GROUP BY "_ORDINAL_NUMBER" ORDER BY "_ORDINAL_NUMBER"; $$ | |
LANGUAGE SQL | |
IMMUTABLE | |
RETURNS NULL ON NULL INPUT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment