Skip to content

Instantly share code, notes, and snippets.

@Himstar8
Created April 2, 2020 09:26
Show Gist options
  • Save Himstar8/934cb0ea54b59f6939ceddfd956268ec to your computer and use it in GitHub Desktop.
Save Himstar8/934cb0ea54b59f6939ceddfd956268ec to your computer and use it in GitHub Desktop.
CREATE OR REPLACE FUNCTION array_sort (ANYARRAY)
RETURNS ANYARRAY LANGUAGE SQL
AS $$
SELECT ARRAY(SELECT unnest($1) ORDER BY 1)
$$;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment