* construct_empty_array --- make a zero-dimensional array of given type */
| 3537 | * construct_empty_array --- make a zero-dimensional array of given type |
| 3538 | */ |
| 3539 | ArrayType * |
| 3540 | construct_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 |
no test coverage detected