1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

array_offset() and array_offsets()

These functions return the offset position or positions of a value in an
array.

Author: Pavel Stěhule
Reviewed by: Jim Nasby
This commit is contained in:
Alvaro Herrera
2015-03-18 16:01:34 -03:00
parent f9dead5624
commit 13dbc7a824
10 changed files with 525 additions and 8 deletions

View File

@@ -323,7 +323,7 @@ extern ArrayBuildStateAny *accumArrayResultAny(ArrayBuildStateAny *astate,
extern Datum makeArrayResultAny(ArrayBuildStateAny *astate,
MemoryContext rcontext, bool release);
extern ArrayIterator array_create_iterator(ArrayType *arr, int slice_ndim);
extern ArrayIterator array_create_iterator(ArrayType *arr, int slice_ndim, ArrayMetaState *mstate);
extern bool array_iterate(ArrayIterator iterator, Datum *value, bool *isnull);
extern void array_free_iterator(ArrayIterator iterator);
@@ -358,6 +358,10 @@ extern Datum array_agg_finalfn(PG_FUNCTION_ARGS);
extern Datum array_agg_array_transfn(PG_FUNCTION_ARGS);
extern Datum array_agg_array_finalfn(PG_FUNCTION_ARGS);
extern Datum array_offset(PG_FUNCTION_ARGS);
extern Datum array_offset_start(PG_FUNCTION_ARGS);
extern Datum array_offsets(PG_FUNCTION_ARGS);
/*
* prototypes for functions defined in array_typanalyze.c
*/