format_type_be(element_type))));
my_extra->element_type = element_type;
- fmgr_info(typentry->eq_opr_finfo.fn_oid, &my_extra->proc);
+ fmgr_info_cxt(typentry->eq_opr_finfo.fn_oid, &my_extra->proc,
+ fcinfo->flinfo->fn_mcxt);
}
/* Examine each array element until we find a match. */
format_type_be(element_type))));
my_extra->element_type = element_type;
- fmgr_info(typentry->eq_opr_finfo.fn_oid, &my_extra->proc);
+ fmgr_info_cxt(typentry->eq_opr_finfo.fn_oid, &my_extra->proc,
+ fcinfo->flinfo->fn_mcxt);
}
/*
{2}
(1 row)
+SELECT
+ array_position(ids, (1, 1)),
+ array_positions(ids, (1, 1))
+ FROM
+(VALUES
+ (ARRAY[(0, 0), (1, 1)]),
+ (ARRAY[(1, 1)])
+) AS f (ids);
+ array_position | array_positions
+----------------+-----------------
+ 2 | {2}
+ 1 | {1}
+(2 rows)
+
-- operators
SELECT a FROM arrtest WHERE b = ARRAY[[[113,142],[1,147]]];
a
SELECT array_position('[2:4]={1,2,3}'::int[], 1);
SELECT array_positions('[2:4]={1,2,3}'::int[], 1);
+SELECT
+ array_position(ids, (1, 1)),
+ array_positions(ids, (1, 1))
+ FROM
+(VALUES
+ (ARRAY[(0, 0), (1, 1)]),
+ (ARRAY[(1, 1)])
+) AS f (ids);
+
-- operators
SELECT a FROM arrtest WHERE b = ARRAY[[[113,142],[1,147]]];
SELECT NOT ARRAY[1.1,1.2,1.3] = ARRAY[1.1,1.2,1.3] AS "FALSE";