I'll auto-answer ;-)
Based on the function "btoptions" from postgres source, which takes aas a
first arg a text[] :
ArrayType *array;
Datum *dimdatums;
int ndim;
array = DatumGetArrayTypeP(dimensions);
Assert(ARR_ELEMTYPE(array) == TEXTOID);
pcinfo("after assert \n");
deconstruct_ar
Hey,
I'm trying to use an array of text as input in a C function in a custom
extension.
the prototype of the sql function is :
CREATE OR REPLACE FUNCTION pc_subset( dimensions TEXT[])
it is called like :
pc_subset( ARRAY['X'::text,'Y'::text])
and the C function trying to read the text array