Обсуждение: Bytea Hex Format
Hello, Listed on commits for PostgreSQL this week was one from Tom Lane: "Support hex-string input and output for type BYTEA. Both hex format and the traditional "escape" format are automatically handled on input. The output format is selected by the new GUC variable bytea_output. As committed, bytea_output defaults to HEX, which is an *incompatible change*. We will keep it this way for awhile for testing purposes, but should consider whether to switch to the more backwards-compatible default of ESCAPE before 8.5 is released. Peter Eisentraut" Is this going to effect the JDBC default behavior, currently the the MySQLView program uses getBytes() to dump data for BYTEA and that is in Octal format. Dana Proctor MyJSQLView Project Manager
On Mon, 10 Aug 2009, dmp wrote: > "Support hex-string input and output for type BYTEA. Both hex format > and the traditional "escape" format are automatically handled on > input. The output format is selected by the new GUC variable > bytea_output. As committed, bytea_output defaults to HEX, which is > an *incompatible change*. > > Is this going to effect the JDBC default behavior, currently the > the MySQLView program uses getBytes() to dump data for BYTEA and > that is in Octal format. > It will require a change to the JDBC driver to correctly interpret hex escaped bytea data (which hasn't happened yet), but JDBC users will not need to change anything, getBytes will still be the call to use. Kris Jurka