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
-- ******************************************************************************************** | |
-- General FX utility functions in PL/pgSql (Postgres) | |
-- Released under the MIT license: http://opensource.org/licenses/mit-license.php by Jon Asher | |
-- Download current source at https://gist.github.com/jasher/6026284 | |
-- ******************************************************************************************** | |
CREATE FUNCTION array_contains(p_int_arr integer[], p_value integer) RETURNS boolean | |
LANGUAGE plpgsql | |
AS $$ | |
BEGIN |