MCPcopy Create free account
hub / github.com/apache/cloudberry / construct_array

Function construct_array

src/backend/utils/adt/arrayfuncs.c:3369–3382  ·  view source on GitHub ↗

* construct_array --- simple method for constructing an array object * * elems: array of Datum items to become the array contents * (NULL element values are not supported). * nelems: number of items * elmtype, elmlen, elmbyval, elmalign: info for the datatype of the items * * A palloc'd 1-D array object is constructed and returned. Note that * elem values will be copied into the object

Source from the content-addressed store, hash-verified

3367 * to hard-wire values if the element type is hard-wired.
3368 */
3369ArrayType *
3370construct_array(Datum *elems, int nelems,
3371 Oid elmtype,
3372 int elmlen, bool elmbyval, char elmalign)
3373{
3374 int dims[1];
3375 int lbs[1];
3376
3377 dims[0] = nelems;
3378 lbs[0] = 1;
3379
3380 return construct_md_array(elems, NULL, 1, dims, lbs,
3381 elmtype, elmlen, elmbyval, elmalign);
3382}
3383
3384/*
3385 * construct_md_array --- simple method for constructing an array object

Callers 15

bt_page_print_tuplesFunction · 0.85
brin_metapage_infoFunction · 0.85
gist_page_opaque_infoFunction · 0.85
gin_page_opaque_infoFunction · 0.85
gin_leafpage_itemsFunction · 0.85
hash_metapage_infoFunction · 0.85
hstore_akeysFunction · 0.85
show_trgmFunction · 0.85
serialize_expr_statsFunction · 0.85
GUCArrayAddFunction · 0.85
GUCArrayDeleteFunction · 0.85

Calls 1

construct_md_arrayFunction · 0.85

Tested by 2