Revision 13452
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1948 | 1948 |
|
1949 | 1949 |
|
1950 | 1950 |
-- |
1951 |
-- Name: in_reverse(anyarray); Type: FUNCTION; Schema: util; Owner: - |
|
1952 |
-- |
|
1953 |
|
|
1954 |
CREATE FUNCTION in_reverse("array" anyarray) RETURNS SETOF anyelement |
|
1955 |
LANGUAGE sql IMMUTABLE |
|
1956 |
AS $_$ |
|
1957 |
SELECT * FROM unnest($1) ORDER BY row_number() OVER () DESC |
|
1958 |
$_$; |
|
1959 |
|
|
1960 |
|
|
1961 |
-- |
|
1951 | 1962 |
-- Name: inherit(regclass, regclass); Type: FUNCTION; Schema: util; Owner: - |
1952 | 1963 |
-- |
1953 | 1964 |
|
Also available in: Unified diff
schemas/util.sql: added in_reverse()