@@ -1123,7 +1123,7 @@ get_func_arg_info(HeapTuple procTup,
1123
1123
numargs < 0 ||
1124
1124
ARR_HASNULL (arr )||
1125
1125
ARR_ELEMTYPE (arr )!= OIDOID )
1126
- elog (ERROR ,"proallargtypes is not a 1-D Oid array" );
1126
+ elog (ERROR ,"proallargtypes is not a 1-D Oid array or it contains nulls " );
1127
1127
Assert (numargs >=procStruct -> pronargs );
1128
1128
* p_argtypes = (Oid * )palloc (numargs * sizeof (Oid ));
1129
1129
memcpy (* p_argtypes ,ARR_DATA_PTR (arr ),
@@ -1170,7 +1170,8 @@ get_func_arg_info(HeapTuple procTup,
1170
1170
ARR_DIMS (arr )[0 ]!= numargs ||
1171
1171
ARR_HASNULL (arr )||
1172
1172
ARR_ELEMTYPE (arr )!= CHAROID )
1173
- elog (ERROR ,"proargmodes is not a 1-D char array" );
1173
+ elog (ERROR ,"proargmodes is not a 1-D char array of length %d or it contains nulls" ,
1174
+ numargs );
1174
1175
* p_argmodes = (char * )palloc (numargs * sizeof (char ));
1175
1176
memcpy (* p_argmodes ,ARR_DATA_PTR (arr ),
1176
1177
numargs * sizeof (char ));
@@ -1210,7 +1211,7 @@ get_func_trftypes(HeapTuple procTup,
1210
1211
nelems < 0 ||
1211
1212
ARR_HASNULL (arr )||
1212
1213
ARR_ELEMTYPE (arr )!= OIDOID )
1213
- elog (ERROR ,"protrftypes is not a 1-D Oid array" );
1214
+ elog (ERROR ,"protrftypes is not a 1-D Oid array or it contains nulls " );
1214
1215
Assert (nelems >= ((Form_pg_proc )GETSTRUCT (procTup ))-> pronargs );
1215
1216
* p_trftypes = (Oid * )palloc (nelems * sizeof (Oid ));
1216
1217
memcpy (* p_trftypes ,ARR_DATA_PTR (arr ),
@@ -1261,7 +1262,7 @@ get_func_input_arg_names(char prokind,
1261
1262
if (ARR_NDIM (arr )!= 1 ||
1262
1263
ARR_HASNULL (arr )||
1263
1264
ARR_ELEMTYPE (arr )!= TEXTOID )
1264
- elog (ERROR ,"proargnames is not a 1-D text array" );
1265
+ elog (ERROR ,"proargnames is not a 1-D text array or it contains nulls " );
1265
1266
deconstruct_array (arr ,TEXTOID ,-1 , false,TYPALIGN_INT ,
1266
1267
& argnames ,NULL ,& numargs );
1267
1268
if (proargmodes != PointerGetDatum (NULL ))
@@ -1271,7 +1272,8 @@ get_func_input_arg_names(char prokind,
1271
1272
ARR_DIMS (arr )[0 ]!= numargs ||
1272
1273
ARR_HASNULL (arr )||
1273
1274
ARR_ELEMTYPE (arr )!= CHAROID )
1274
- elog (ERROR ,"proargmodes is not a 1-D char array" );
1275
+ elog (ERROR ,"proargmodes is not a 1-D char array of length %d or it contains nulls" ,
1276
+ numargs );
1275
1277
argmodes = (char * )ARR_DATA_PTR (arr );
1276
1278
}
1277
1279
else
@@ -1368,14 +1370,15 @@ get_func_result_name(Oid functionId)
1368
1370
numargs < 0 ||
1369
1371
ARR_HASNULL (arr )||
1370
1372
ARR_ELEMTYPE (arr )!= CHAROID )
1371
- elog (ERROR ,"proargmodes is not a 1-D char array" );
1373
+ elog (ERROR ,"proargmodes is not a 1-D char array or it contains nulls " );
1372
1374
argmodes = (char * )ARR_DATA_PTR (arr );
1373
1375
arr = DatumGetArrayTypeP (proargnames );/* ensure not toasted */
1374
1376
if (ARR_NDIM (arr )!= 1 ||
1375
1377
ARR_DIMS (arr )[0 ]!= numargs ||
1376
1378
ARR_HASNULL (arr )||
1377
1379
ARR_ELEMTYPE (arr )!= TEXTOID )
1378
- elog (ERROR ,"proargnames is not a 1-D text array" );
1380
+ elog (ERROR ,"proargnames is not a 1-D text array of length %d or it contains nulls" ,
1381
+ numargs );
1379
1382
deconstruct_array (arr ,TEXTOID ,-1 , false,TYPALIGN_INT ,
1380
1383
& argnames ,NULL ,& nargnames );
1381
1384
Assert (nargnames == numargs );
@@ -1506,14 +1509,15 @@ build_function_result_tupdesc_d(char prokind,
1506
1509
numargs < 0 ||
1507
1510
ARR_HASNULL (arr )||
1508
1511
ARR_ELEMTYPE (arr )!= OIDOID )
1509
- elog (ERROR ,"proallargtypes is not a 1-D Oid array" );
1512
+ elog (ERROR ,"proallargtypes is not a 1-D Oid array or it contains nulls " );
1510
1513
argtypes = (Oid * )ARR_DATA_PTR (arr );
1511
1514
arr = DatumGetArrayTypeP (proargmodes );/* ensure not toasted */
1512
1515
if (ARR_NDIM (arr )!= 1 ||
1513
1516
ARR_DIMS (arr )[0 ]!= numargs ||
1514
1517
ARR_HASNULL (arr )||
1515
1518
ARR_ELEMTYPE (arr )!= CHAROID )
1516
- elog (ERROR ,"proargmodes is not a 1-D char array" );
1519
+ elog (ERROR ,"proargmodes is not a 1-D char array of length %d or it contains nulls" ,
1520
+ numargs );
1517
1521
argmodes = (char * )ARR_DATA_PTR (arr );
1518
1522
if (proargnames != PointerGetDatum (NULL ))
1519
1523
{
@@ -1522,7 +1526,8 @@ build_function_result_tupdesc_d(char prokind,
1522
1526
ARR_DIMS (arr )[0 ]!= numargs ||
1523
1527
ARR_HASNULL (arr )||
1524
1528
ARR_ELEMTYPE (arr )!= TEXTOID )
1525
- elog (ERROR ,"proargnames is not a 1-D text array" );
1529
+ elog (ERROR ,"proargnames is not a 1-D text array of length %d or it contains nulls" ,
1530
+ numargs );
1526
1531
deconstruct_array (arr ,TEXTOID ,-1 , false,TYPALIGN_INT ,
1527
1532
& argnames ,NULL ,& nargnames );
1528
1533
Assert (nargnames == numargs );