1connected 2 3Testing conversions... 4Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param "2"... 5Result set: 60 7 8Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param "-2"... 9Result set: 101 11 12Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "2"... 13Result set: 140 15 16Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "-2"... 17Result set: 181 19 20Testing "SELECT 2.2 > ?" with SQL_C_CHAR -> SQL_FLOAT param "2.3"... 21Result set: 220 23 24Testing "SELECT 3.3 > ?" with SQL_C_CHAR -> SQL_DOUBLE param "3.01"... 25Result set: 261 27 28Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_CHAR param "5 escapes: \ and '"... 29SQLExecDirect failed 3022P02=ERROR: invalid input syntax for type integer: "5 escapes: \ and '"; 31Error while executing the query 32 33Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "32767"... 34Result set: 350 36 37Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "-32768"... 38Result set: 391 40 41 42Testing conversions whose result depend on whether the 43parameter is treated as a string or an integer... 44Testing "SELECT '555' > ?" with SQL_C_CHAR -> SQL_INTEGER param "6"... 45Result set: 461 47 48Testing "SELECT '555' > ?" with SQL_C_CHAR -> SQL_SMALLINT param "6"... 49Result set: 501 51 52Testing "SELECT '555' > ?" with SQL_C_CHAR -> SQL_CHAR param "6"... 53Result set: 540 55 56Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param "99999999999999999999999"... 57Result set: 580 59 60 61Testing conversions with invalid values... 62Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_INTEGER param "2, 'injected, BAD!'"... 63SQLExecDirect failed 6422P02=ERROR: invalid input syntax for type integer: "2, 'injected, BAD!'"; 65Error while executing the query 66 67Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "2, 'injected, BAD!'"... 68SQLExecDirect failed 6922P02=ERROR: invalid input syntax for type smallint: "2, 'injected, BAD!'"; 70Error while executing the query 71 72Testing "SELECT 1.3 > ?" with SQL_C_CHAR -> SQL_FLOAT param "3', 'injected, BAD!', '1"... 73SQLExecDirect failed 7422P02=ERROR: invalid input syntax for type double precision: "3', 'injected, BAD!', '1"; 75Error while executing the query 76 77Testing "SELECT 1.4 > ?" with SQL_C_CHAR -> SQL_FLOAT param "4 \'bad', '1"... 78SQLExecDirect failed 7922P02=ERROR: invalid input syntax for type double precision: "4 \'bad', '1"; 80Error while executing the query 81 82Testing "SELECT 1-?" with SQL_C_CHAR -> SQL_INTEGER param "-1"... 83Result set: 842 85 86Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param "-"... 87SQLExecDirect failed 8822P02=ERROR: invalid input syntax for type integer: "-"; 89Error while executing the query 90 91Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param ""... 92SQLExecDirect failed 9322P02=ERROR: invalid input syntax for type integer: ""; 94Error while executing the query 95 96Testing "SELECT 1-?" with SQL_C_CHAR -> SQL_SMALLINT param "-1"... 97Result set: 982 99 100Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "-"... 101SQLExecDirect failed 10222P02=ERROR: invalid input syntax for type smallint: "-"; 103Error while executing the query 104 105Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param ""... 106SQLExecDirect failed 10722P02=ERROR: invalid input syntax for type smallint: ""; 108Error while executing the query 109 110Testing "SELECT 0-?" with SQL_C_SLONG -> SQL_INTEGER param 1234... 111Result set: 112-1234 113 114Testing "SELECT 0-?" with SQL_C_SLONG -> SQL_INTEGER param -1234... 115Result set: 1161234 117 118Testing "SELECT 0-?" with SQL_C_SLONG -> SQL_SMALLINT param 1234... 119Result set: 120-1234 121 122Testing "SELECT 0-?" with SQL_C_SLONG -> SQL_SMALLINT param -1234... 123Result set: 1241234 125 126 127Testing bytea conversions 128Testing "SELECT ?" with SQL_C_BINARY -> SQL_BINARY param... 129Result set: 130\x666F6F0A5C62617200 131 132Testing "SELECT ?" with SQL_C_CHAR -> SQL_BINARY param "666f6f0001"... 133Result set: 134\x666F6F0001 135 136Testing "SELECT ?::text" with SQL_C_BINARY -> SQL_CHAR param... 137Result set: 138foo 139\bar 140 141 142Testing datetime conversions 143Testing "SELECT ?" with SQL_C_CHAR -> SQL_TIMESTAMP param "04-22-2011 01:23:45"... 144Result set: 1452011-04-22 01:23:45 146 147Testing "SELECT ?" with SQL_C_CHAR -> SQL_TIMESTAMP param "{ts '2011-04-22 01:23:45'}"... 148Result set: 1492011-04-22 01:23:45 150 151Testing "SELECT ?" with SQL_C_CHAR -> SQL_TIME param "{t '01:23:45'}"... 152Result set: 15301:23:45 154 155Testing "SELECT ?" with SQL_C_CHAR -> SQL_DATE param "{d '2011-04-22'}"... 156Result set: 1572011-04-22 158 159disconnecting 160