X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6DA02D1B481 for ; Fri, 19 Dec 2003 21:27:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 81495-05 for ; Fri, 19 Dec 2003 17:26:13 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id D8BE9D1B448 for ; Fri, 19 Dec 2003 17:26:10 -0400 (AST) Received: (qmail 23650 invoked by uid 500); 19 Dec 2003 21:26:07 -0000 Date: Fri, 19 Dec 2003 15:26:07 -0600 From: Bruno Wolff III To: Matt Van Mater Cc: pgsql-sql@postgresql.org Subject: Re: how to preserve \n in select statement Message-ID: <20031219212607.GB14968@wolff.to> Mail-Followup-To: Matt Van Mater , pgsql-sql@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/134 X-Sequence-Number: 16300 On Fri, Dec 19, 2003 at 10:06:28 -0500, Matt Van Mater wrote: > I have a table that has a few text value types, and I enter a bunch of text > with '\n' representing a newline. When I select the records from that > table, postgresql 7.3 represents those \n as newlines and actually outputs > the a newline rather than as a \n as entered. I want to be able to get my > \n text out of the select statement in the exact same manner it was > inserted. If you really want to store \n so that something else will interpret \n as a newline, then use '\\n' in the string constant.