Revision 10391
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
1140 | 1140 |
|
1141 | 1141 |
|
1142 | 1142 |
-- |
1143 |
-- Name: is_more_complete_than(anyelement, anyelement); Type: FUNCTION; Schema: util; Owner: - |
|
1144 |
-- |
|
1145 |
|
|
1146 |
CREATE FUNCTION is_more_complete_than("left" anyelement, "right" anyelement) RETURNS boolean |
|
1147 |
LANGUAGE sql IMMUTABLE |
|
1148 |
AS $_$ |
|
1149 |
SELECT $1 IS NOT DISTINCT FROM $2 OR ($1 IS NOT NULL AND $2 IS NULL) |
|
1150 |
$_$; |
|
1151 |
|
|
1152 |
|
|
1153 |
-- |
|
1143 | 1154 |
-- Name: join_strs_transform(text, text, text); Type: FUNCTION; Schema: util; Owner: - |
1144 | 1155 |
-- |
1145 | 1156 |
|
... | ... | |
1902 | 1913 |
COMMENT ON OPERATOR => (text[], anyelement) IS 'usage: array[''key1'', ...]::text[] => ''value'''; |
1903 | 1914 |
|
1904 | 1915 |
|
1916 |
-- |
|
1917 |
-- Name: ?>=; Type: OPERATOR; Schema: util; Owner: - |
|
1918 |
-- |
|
1919 |
|
|
1920 |
CREATE OPERATOR ?>= ( |
|
1921 |
PROCEDURE = is_more_complete_than, |
|
1922 |
LEFTARG = anyelement, |
|
1923 |
RIGHTARG = anyelement |
|
1924 |
); |
|
1925 |
|
|
1926 |
|
|
1905 | 1927 |
SET default_tablespace = ''; |
1906 | 1928 |
|
1907 | 1929 |
SET default_with_oids = false; |
Also available in: Unified diff
schemas/util.sql: added ?>= operator with is_more_complete_than() function