* 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
| 3367 | * to hard-wire values if the element type is hard-wired. |
| 3368 | */ |
| 3369 | ArrayType * |
| 3370 | construct_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 |