with the following SQL:
insert into dbc_test ( i16 ) values ( -32768::int2 );
This fails with an out of range error. Changed to:
insert into dbc_test ( i16 ) values ( (-32768)::int2 );
patch by Kelly Burkhart
if (param_sqltype == SQL_BIT)
CVT_APPEND_CHAR(qb, '\''); /* Open Quote */
+ if (param_sqltype == SQL_SMALLINT)
+ {
+ CVT_APPEND_STR(qb, "(");
+ }
+
if (buf)
{
switch (used)
if (param_sqltype == SQL_SMALLINT)
{
/* needs cast because there is no automatic downcast from int4 constants */
- CVT_APPEND_STR(qb, "::int2");
+ CVT_APPEND_STR(qb, ")::int2");
}
if (param_sqltype == SQL_BIT)