src/backend/catalog/pg_subscription.c
static List *
textarray_to_stringlist(ArrayType *textarray)
{
	Datum		   *elems;
	int				nelems, i;
	List		   *res = NIL;

	deconstruct_array(textarray,
					  TEXTOID, -1, false, 'i',
					  &elems, NULL, &nelems);

	if (nelems == 0)
		return NIL;

	for (i = 0; i < nelems; i++)
		res = lappend(res, makeString(pstrdup(TextDatumGetCString(elems[i]))));

	return res;
}
/*
 * Convert text array to list of strings.
 *
 * Note: the resulting list of strings is pallocated here.
 */
Convert text array to list of strings.
Note: the resulting list of strings is pallocated here.
Convert text array to list of strings . Note : the resulting list of strings is pallocated here .
static List *
textarray_to_stringlist(ArrayType *textarray)
{
	Datum		   *elems;
	int				nelems, i;
	List		   *res = NIL;
	deconstruct_array(textarray,
					  TEXTOID, -1, false, 'i',
					  &elems, NULL, &nelems);
	if (nelems == 0)
		return NIL;
	for (i = 0; i < nelems; i++)
		res = lappend(res, makeString(pstrdup(TextDatumGetCString(elems[i]))));
	return res;
}
static List * textarray_to_stringlist ( ArrayType * textarray ) { Datum * elems ; int nelems , i ; List * res = NIL ; deconstruct_array ( textarray , TEXTOID , -1 , false , ' ' , & elems , NULL , & nelems ) ; if ( nelems == 0 ) return NIL ; for ( i = 0 ; i < nelems ; i ++ ) res = lappend ( res , makeString ( pstrdup ( TextDatumGetCString ( elems [ i ] ) ) ) ) ; return res ; }
Convert text array to list of strings.
Convert text array to list of strings .