Add extra 2 digits to the precision of floating numbers.
authorHiroshi Inoue <inoue@tpf.co.jp>
Tue, 11 Feb 2003 08:27:29 +0000 (08:27 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Tue, 11 Feb 2003 08:27:29 +0000 (08:27 +0000)
connection.c

index 43e69da4c982a3dbf86bf12df3f163010c460474..e36b8efa592962dfb384af01d8133bdc4523f5ea 100644 (file)
@@ -1827,6 +1827,17 @@ CC_send_settings(ConnectionClass *self)
 
    }
 
+   /* extra_float_digits (applicable since 7.4) */
+   if (PG_VERSION_GT(self, 7.3))
+   {
+       result = PGAPI_ExecDirect(hstmt, "set extra_float_digits to 2", SQL_NTS);
+       if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO))
+           status = FALSE;
+
+       mylog("%s: result %d, status %d from set extra_float_digits\n", func, result, status);
+
+   }
+
    /* Global settings */
    if (ci->drivers.conn_settings[0] != '\0')
    {