|
54 | 54 | #define VARCHARLABEL "varchar" |
55 | 55 | #define VARCHAROID 1043 |
56 | 56 |
|
57 | | -#define PG_INT32_MIN (-0x7FFFFFFF-1) |
58 | | -#define PG_INT32_MAX (0x7FFFFFFF) |
59 | | - |
60 | | -#if defined(_MSC_VER) |
61 | | -# define strtoll(s, f, b) _atoi64(s) |
62 | | -#elif !defined(HAVE_STRTOLL) |
63 | | -# if defined(HAVE_ATOLL) |
64 | | -# define strtoll(s, f, b) atoll(s) |
65 | | -# else |
66 | | -# define strtoll(s, f, b) strtol(s, f, b) |
67 | | -# endif |
68 | | -#endif |
69 | | - |
70 | 57 |
|
71 | 58 |
|
72 | 59 | static int pgsql_stmt_dtor(pdo_stmt_t *stmt) |
@@ -403,16 +390,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data * |
403 | 390 | S->param_formats[param->paramno] = 0; |
404 | 391 | } |
405 | 392 |
|
406 | | - if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_INT) { |
407 | | - /* we need to check if the number requires bigints */ |
408 | | - long long val = strtoll(Z_STRVAL_P(parameter), NULL, 10); |
409 | | - |
410 | | - if (val > PG_INT32_MAX || val < PG_INT32_MIN) { |
411 | | - S->param_types[param->paramno] = INT8OID; |
412 | | - } else { |
413 | | - S->param_types[param->paramno] = INT4OID; |
414 | | - } |
415 | | - } else if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { |
| 393 | + if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { |
416 | 394 | S->param_types[param->paramno] = 0; |
417 | 395 | S->param_formats[param->paramno] = 1; |
418 | 396 | } else { |
|
0 commit comments