pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-admin@postgresql.org
Subject: Re: line length line break issue
Date: Fri, 25 Oct 2002 10:15:52 -0400
Message-ID: <20021025101552.A13384@mail.libertyrms.com> (raw)
In-Reply-To: <200210221800.57859.iddwb@moroni.pp.asu.edu>
References: <200210221800.57859.iddwb@moroni.pp.asu.edu>

On Tue, Oct 22, 2002 at 06:00:57PM -0700, David Bear wrote:
> \pset recordsep "^" 
>  (and other chars along with the caret) but it seems the postgress is not 
> using that character.  My thinking was to strip all cr/lf, the replace the 
> caret with a newline.  Then we could bring the data into something like 
> excel.

recordsep is for the character _between records_.  But the cr/lf you
have in the data is inside your records.

What you probably want to do is to experiment with the regular
expressions facilities of PostgreSQL, and use the text-manipulation
functions to get rid of the cr/lf.  Or, you could edit the dump file
using, say, sed, and then import the data again.  Obviously, you also
need to fix the PHP.

A


-- 
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110




view thread (2+ messages)

Message-ID: <20021025101552.A13384@mail.libertyrms.com>
Permalink:  ../20021025101552.A13384@mail.libertyrms.com/
Also on:    postgresql.org/message-id/20021025101552.A13384@mail.libertyrms.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: andrew@libertyrms.info
  Subject: Re: line length line break issue
  In-Reply-To: <20021025101552.A13384@mail.libertyrms.com>
  References: <200210221800.57859.iddwb@moroni.pp.asu.edu> <20021025101552.A13384@mail.libertyrms.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox