Revision 10314
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
288 | 288 |
|
289 | 289 |
|
290 | 290 |
-- |
291 |
-- Name: _map(hstore, anyelement); Type: FUNCTION; Schema: util; Owner: - |
|
292 |
-- |
|
293 |
|
|
294 |
CREATE FUNCTION _map(map hstore, value anyelement) RETURNS anyelement |
|
295 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
296 |
AS $$ |
|
297 |
DECLARE |
|
298 |
result value%TYPE := util._map(map, value::text); |
|
299 |
BEGIN |
|
300 |
RETURN result; |
|
301 |
END; |
|
302 |
$$; |
|
303 |
|
|
304 |
|
|
305 |
-- |
|
291 | 306 |
-- Name: _max(anyelement, anyelement, anyelement, anyelement, anyelement, anyelement, anyelement, anyelement, anyelement, anyelement); Type: FUNCTION; Schema: util; Owner: - |
292 | 307 |
-- |
293 | 308 |
|
Also available in: Unified diff
schemas/util.sql: added _map(map hstore, value anyelement) to seamlessly map types other than text (by casting back and forth between text and the value type)