show value of backslashes in string array argument
От | Sabin Coanda |
---|---|
Тема | show value of backslashes in string array argument |
Дата | |
Msg-id | fh95jt$1ff7$1@news.hub.org обсуждение исходный текст |
Ответы |
Re: show value of backslashes in string array argument
Re: show value of backslashes in string array argument |
Список | pgsql-sql |
Hi there, I have a problem using backslash character as part of a string array item. I use "PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)" version, with standard_conforming_strings = 'on'. I found that, is that in spite of using standard_conforming_strings = 'on', the string array items are shown in C escape sequences conventions. Use the following scenario: - create a table with CREATE TABLE test ( "colVarchar" character varying, "colVarcharArray" character varying[] ) - insert a row with a string composed by just one characterbackslash, and an array with just one item, with the same value of one backslash, with: INSERT INTO test VALUES ( '\', ARRAY['\' ] ); - show the values with: SELECT * FROM test And the result is: colVarchar | colVarcharArray ------------+-----------------\ | {"\\"} The question is why the two strings are shown different in spite they are the same, and standard_conforming_strings = 'on' ? Sabin
В списке pgsql-sql по дате отправления: