Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 79E1E37B9BC for ; Mon, 12 Nov 2007 05:43:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 74329-02 for ; Mon, 12 Nov 2007 05:43:46 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 69D1A37B9B4 for ; Mon, 12 Nov 2007 05:43:49 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id lAC9hkDB059801 for ; Mon, 12 Nov 2007 05:43:46 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id lAC9FfTF048618 for pgsql-sql@postgresql.org; Mon, 12 Nov 2007 05:15:41 -0400 (AST) (envelope-from news) From: "Sabin Coanda" X-Newsgroups: pgsql.sql Subject: show value of backslashes in string array argument Date: Mon, 12 Nov 2007 11:15:48 +0200 Organization: Hub.Org Networking Services Lines: 35 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/46 X-Sequence-Number: 29574 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 character backslash, 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