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 33F25D1B444 for ; Fri, 19 Dec 2003 15:07:15 +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 18802-02 for ; Fri, 19 Dec 2003 11:06:29 -0400 (AST) Received: from hotmail.com (bay9-f53.bay9.hotmail.com [64.4.47.53]) by svr1.postgresql.org (Postfix) with ESMTP id CF816D1B447 for ; Fri, 19 Dec 2003 11:06:24 -0400 (AST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 19 Dec 2003 07:06:28 -0800 Received: from 65.205.28.100 by by9fd.bay9.hotmail.msn.com with HTTP; Fri, 19 Dec 2003 15:06:28 GMT X-Originating-IP: [65.205.28.100] X-Originating-Email: [nutter_@hotmail.com] X-Sender: nutter_@hotmail.com From: "Matt Van Mater" To: pgsql-sql@postgresql.org Subject: how to preserve \n in select statement Date: Fri, 19 Dec 2003 10:06:28 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 19 Dec 2003 15:06:28.0955 (UTC) FILETIME=[ADEB2AB0:01C3C641] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/128 X-Sequence-Number: 16294 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. I found a workaround where I can use the copy to command to copy a table to a text file, and the command preserves the \n characters. The problem with that is the copy to command overwrites the output file every time it is written to. That stinks because then I can't run multiple queries and direct the output to a file all at once. (I would prefer to set the output file as \o '/path/to/oufile.txt' and have all queries dump their results there) Is there a way to make the select statement not interpret newline escape characters? Matt Van Mater _________________________________________________________________ Have fun customizing MSN Messenger — learn how here! http://www.msnmessenger-download.com/tracking/reach_customize