Revision 10608
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
1136 | 1136 |
|
1137 | 1137 |
|
1138 | 1138 |
-- |
1139 |
-- Name: hstore(text[], anyelement); Type: FUNCTION; Schema: util; Owner: - |
|
1140 |
-- |
|
1141 |
|
|
1142 |
CREATE FUNCTION hstore(keys text[], value anyelement) RETURNS hstore |
|
1143 |
LANGUAGE sql IMMUTABLE |
|
1144 |
AS $_$ |
|
1145 |
SELECT util.hstore($1, $2::text) |
|
1146 |
$_$; |
|
1147 |
|
|
1148 |
|
|
1149 |
-- |
|
1150 |
-- Name: FUNCTION hstore(keys text[], value anyelement); Type: COMMENT; Schema: util; Owner: - |
|
1151 |
-- |
|
1152 |
|
|
1153 |
COMMENT ON FUNCTION hstore(keys text[], value anyelement) IS 'avoids repeating the same value for each key'; |
|
1154 |
|
|
1155 |
|
|
1156 |
-- |
|
1157 | 1139 |
-- Name: is_constant(col_ref); Type: FUNCTION; Schema: util; Owner: - |
1158 | 1140 |
-- |
1159 | 1141 |
|
... | ... | |
1928 | 1910 |
CREATE OPERATOR => ( |
1929 | 1911 |
PROCEDURE = hstore, |
1930 | 1912 |
LEFTARG = text[], |
1931 |
RIGHTARG = anyelement
|
|
1913 |
RIGHTARG = text
|
|
1932 | 1914 |
); |
1933 | 1915 |
|
1934 | 1916 |
|
1935 | 1917 |
-- |
1936 |
-- Name: OPERATOR => (text[], anyelement); Type: COMMENT; Schema: util; Owner: -
|
|
1918 |
-- Name: OPERATOR => (text[], text); Type: COMMENT; Schema: util; Owner: -
|
|
1937 | 1919 |
-- |
1938 | 1920 |
|
1939 |
COMMENT ON OPERATOR => (text[], anyelement) IS 'usage: array[''key1'', ...]::text[] => ''value''';
|
|
1921 |
COMMENT ON OPERATOR => (text[], text) IS 'usage: array[''key1'', ...]::text[] => ''value''';
|
|
1940 | 1922 |
|
1941 | 1923 |
|
1942 | 1924 |
-- |
Also available in: Unified diff
schemas/util.sql: hstore(text[], anyelement): replaced with just hstore(text[], text) so that bare literals (of type unknown) are auto-cast to text instead of causing a "could not determine polymorphic type because input has type "unknown"" error