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

Function construct_empty_array

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

* construct_empty_array --- make a zero-dimensional array of given type */

Source from the content-addressed store, hash-verified

3537 * construct_empty_array --- make a zero-dimensional array of given type
3538 */
3539ArrayType *
3540construct_empty_array(Oid elmtype)
3541{
3542 ArrayType *result;
3543
3544 result = (ArrayType *) palloc0(sizeof(ArrayType));
3545 SET_VARSIZE(result, sizeof(ArrayType));
3546 result->ndim = 0;
3547 result->dataoffset = 0;
3548 result->elemtype = elmtype;
3549 return result;
3550}
3551
3552/*
3553 * construct_empty_expanded_array: make an empty expanded array

Callers 15

new_intArrayTypeFunction · 0.85
resize_intArrayTypeFunction · 0.85
hstore_slice_to_arrayFunction · 0.85
hstore_akeysFunction · 0.85
hstore_avalsFunction · 0.85
hstore_to_array_internalFunction · 0.85
PLySequence_ToArrayFunction · 0.85
array_inFunction · 0.85
array_recvFunction · 0.85
array_get_sliceFunction · 0.85
array_mapFunction · 0.85

Calls 1

palloc0Function · 0.50

Tested by

no test coverage detected