Revision 10357
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
1046 | 1046 |
|
1047 | 1047 |
|
1048 | 1048 |
-- |
1049 |
-- Name: hstore(anyarray, anyelement); Type: FUNCTION; Schema: util; Owner: - |
|
1050 |
-- |
|
1051 |
|
|
1052 |
CREATE FUNCTION hstore(keys anyarray, value anyelement) RETURNS hstore |
|
1053 |
LANGUAGE sql IMMUTABLE |
|
1054 |
AS $_$ |
|
1055 |
SELECT util.hstore($1::text[], $2) |
|
1056 |
$_$; |
|
1057 |
|
|
1058 |
|
|
1059 |
-- |
|
1060 |
-- Name: FUNCTION hstore(keys anyarray, value anyelement); Type: COMMENT; Schema: util; Owner: - |
|
1061 |
-- |
|
1062 |
|
|
1063 |
COMMENT ON FUNCTION hstore(keys anyarray, value anyelement) IS 'avoids repeating the same value for each key'; |
|
1064 |
|
|
1065 |
|
|
1066 |
-- |
|
1067 | 1049 |
-- Name: hstore(text[], anyelement); Type: FUNCTION; Schema: util; Owner: - |
1068 | 1050 |
-- |
1069 | 1051 |
|
... | ... | |
1790 | 1772 |
|
1791 | 1773 |
CREATE OPERATOR => ( |
1792 | 1774 |
PROCEDURE = hstore, |
1793 |
LEFTARG = anyarray,
|
|
1775 |
LEFTARG = text[],
|
|
1794 | 1776 |
RIGHTARG = anyelement |
1795 | 1777 |
); |
1796 | 1778 |
|
1797 | 1779 |
|
1798 | 1780 |
-- |
1799 |
-- Name: OPERATOR => (anyarray, anyelement); Type: COMMENT; Schema: util; Owner: -
|
|
1781 |
-- Name: OPERATOR => (text[], anyelement); Type: COMMENT; Schema: util; Owner: -
|
|
1800 | 1782 |
-- |
1801 | 1783 |
|
1802 |
COMMENT ON OPERATOR => (anyarray, anyelement) IS 'usage: array[''key1'', ...]::text[] => ''value''';
|
|
1784 |
COMMENT ON OPERATOR => (text[], anyelement) IS 'usage: array[''key1'', ...]::text[] => ''value''';
|
|
1803 | 1785 |
|
1804 | 1786 |
|
1805 | 1787 |
SET default_tablespace = ''; |
Also available in: Unified diff
schemas/util.sql: removed hstore(anyarray, anyelement), which did not support dynamic inlining, to avoid confusion over which hstore() function to use. use new hstore(text[], anyelement) instead (with explicit cast on the keys array if needed).