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