Revision 12231
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
1271 | 1271 |
CREATE FUNCTION fix_array("array" anyarray) RETURNS anyarray |
1272 | 1272 |
LANGUAGE sql IMMUTABLE |
1273 | 1273 |
AS $_$ |
1274 |
-- STRICT handles NULLs, so that the array will always be a value |
|
1275 | 1274 |
SELECT CASE WHEN $1 IS NULL THEN NULL ELSE ( |
1276 | 1275 |
CASE WHEN pg_catalog.array_ndims($1) IS NULL THEN util.empty_array($1[1]) ELSE $1 END |
1277 | 1276 |
) END |
Also available in: Unified diff
fix: schemas/util.sql: fix_array(): removed no longer accurate comment about effects of STRICT, which is no longer used