@@ -5484,26 +5484,26 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z
5484
5484
char * name ;
5485
5485
array_init (& elem );
5486
5486
/* pg_attribute.attnum */
5487
- add_assoc_long (& elem , "num" , atoi (PQgetvalue (pg_result ,i , 1 )));
5487
+ add_assoc_long_ex (& elem , "num" , sizeof ( "num" ) - 1 , atoi (PQgetvalue (pg_result , i , 1 )));
5488
5488
/* pg_type.typname */
5489
- add_assoc_string (& elem , "type" , PQgetvalue (pg_result ,i , 2 ));
5489
+ add_assoc_string_ex (& elem , "type" , sizeof ( "type" ) - 1 , PQgetvalue (pg_result , i , 2 ));
5490
5490
/* pg_attribute.attlen */
5491
- add_assoc_long (& elem , "len" , atoi (PQgetvalue (pg_result ,i ,3 )));
5491
+ add_assoc_long_ex (& elem , "len" , sizeof ( "len" ) - 1 , atoi (PQgetvalue (pg_result ,i ,3 )));
5492
5492
/* pg_attribute.attnonull */
5493
- add_assoc_bool (& elem , "not null" , !strcmp (PQgetvalue (pg_result ,i , 4 ), "t" ));
5493
+ add_assoc_bool_ex (& elem , "not null" , sizeof ( "not null" ) - 1 , !strcmp (PQgetvalue (pg_result , i , 4 ), "t" ));
5494
5494
/* pg_attribute.atthasdef */
5495
- add_assoc_bool (& elem , "has default" , !strcmp (PQgetvalue (pg_result ,i ,5 ), "t" ));
5495
+ add_assoc_bool_ex (& elem , "has default" , sizeof ( "has default" ) - 1 , !strcmp (PQgetvalue (pg_result ,i ,5 ), "t" ));
5496
5496
/* pg_attribute.attndims */
5497
- add_assoc_long (& elem , "array dims" , atoi (PQgetvalue (pg_result ,i , 6 )));
5497
+ add_assoc_long_ex (& elem , "array dims" , sizeof ( "array dims" ) - 1 , atoi (PQgetvalue (pg_result , i , 6 )));
5498
5498
/* pg_type.typtype */
5499
- add_assoc_bool (& elem , "is enum" , !strcmp (PQgetvalue (pg_result ,i , 7 ), "e" ));
5499
+ add_assoc_bool_ex (& elem , "is enum" , sizeof ( "is enum" ) - 1 , !strcmp (PQgetvalue (pg_result , i , 7 ), "e" ));
5500
5500
if (extended ) {
5501
5501
/* pg_type.typtype */
5502
- add_assoc_bool (& elem , "is base" , !strcmp (PQgetvalue (pg_result ,i , 7 ), "b" ));
5503
- add_assoc_bool (& elem , "is composite" , !strcmp (PQgetvalue (pg_result ,i , 7 ), "c" ));
5504
- add_assoc_bool (& elem , "is pesudo" , !strcmp (PQgetvalue (pg_result ,i , 7 ), "p" ));
5502
+ add_assoc_bool_ex (& elem , "is base" , sizeof ( "is base" ) - 1 , !strcmp (PQgetvalue (pg_result , i , 7 ), "b" ));
5503
+ add_assoc_bool_ex (& elem , "is composite" , sizeof ( "is composite" ) - 1 , !strcmp (PQgetvalue (pg_result , i , 7 ), "c" ));
5504
+ add_assoc_bool_ex (& elem , "is pesudo" , sizeof ( "is pesudo" ) - 1 , !strcmp (PQgetvalue (pg_result , i , 7 ), "p" ));
5505
5505
/* pg_description.description */
5506
- add_assoc_string (& elem , "description" , PQgetvalue (pg_result ,i , 8 ));
5506
+ add_assoc_string_ex (& elem , "description" , sizeof ( "description" ) - 1 , PQgetvalue (pg_result , i , 8 ));
5507
5507
}
5508
5508
/* pg_attribute.attname */
5509
5509
name = PQgetvalue (pg_result ,i ,0 );
0 commit comments