pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedline length line break issue
2+ messages / 2 participants
[nested] [flat]
* line length line break issue
@ 2002-10-23 01:00 David Bear <iddwb@moroni.pp.asu.edu>
2002-10-25 14:15 ` Re: line length line break issue Andrew Sullivan <andrew@libertyrms.info>
0 siblings, 1 reply; 2+ messages in thread
From: David Bear @ 2002-10-23 01:00 UTC (permalink / raw)
To: pgsql-admin
we had someone make a php app that was a form fill-in type of questionaire.
They stored all data into postgres as vchar type columns. Now the problem we
have is that
1) rows retrieved from select include cr/lf chars from the form, makeing a row
multi lines long
2) rows are so long that their not useable and we can find a useable delimeter
I've tried using
\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.
The problem is the recordsep doesn't seem to work. Any thoughts?
--
David Bear
College of Public Programs/ASU
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: line length line break issue
2002-10-23 01:00 line length line break issue David Bear <iddwb@moroni.pp.asu.edu>
@ 2002-10-25 14:15 ` Andrew Sullivan <andrew@libertyrms.info>
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Sullivan @ 2002-10-25 14:15 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-10-25 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-23 01:00 line length line break issue David Bear <iddwb@moroni.pp.asu.edu>
2002-10-25 14:15 ` Andrew Sullivan <andrew@libertyrms.info>
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