[PATCH] Comments in PGbytea byte[] to pgstring conversion
От | Michael Paesold |
---|---|
Тема | [PATCH] Comments in PGbytea byte[] to pgstring conversion |
Дата | |
Msg-id | 454E577E.3040904@gmx.at обсуждение исходный текст |
Ответы |
Re: [PATCH] Comments in PGbytea byte[] to pgstring conversion
|
Список | pgsql-jdbc |
Change the comments in org.postgresql.util.PGbytea to clarify that the backslashes are given twice as often as required by the backend because of how Java processes string literals (and not because of the backend's parser). Best Regards Michael Paesold diff -crN pgjdbc.bb8feffc6a34/org/postgresql/util/PGbytea.java pgjdbc/org/postgresql/util/PGbytea.java *** pgjdbc.bb8feffc6a34/org/postgresql/util/PGbytea.java 2006-11-05 22:23:38.000000000 +0100 --- pgjdbc/org/postgresql/util/PGbytea.java 2006-11-05 22:23:38.000000000 +0100 *************** *** 116,122 **** if (l_int < 040 || l_int > 0176) { //escape charcter with the form \000, but need two \\ because of ! //the parser l_strbuf.append("\\"); l_strbuf.append((char)(((l_int >> 6) & 0x3) + 48)); l_strbuf.append((char)(((l_int >> 3) & 0x7) + 48)); --- 116,122 ---- if (l_int < 040 || l_int > 0176) { //escape charcter with the form \000, but need two \\ because of ! //the Java parser l_strbuf.append("\\"); l_strbuf.append((char)(((l_int >> 6) & 0x3) + 48)); l_strbuf.append((char)(((l_int >> 3) & 0x7) + 48)); *************** *** 125,131 **** else if (p_buf[i] == (byte)'\\') { //escape the backslash character as \\, but need four \\\\ because ! //of the parser l_strbuf.append("\\\\"); } else --- 125,131 ---- else if (p_buf[i] == (byte)'\\') { //escape the backslash character as \\, but need four \\\\ because ! //of the Java parser l_strbuf.append("\\\\"); } else
В списке pgsql-jdbc по дате отправления: