Subject: newlines

From: [email-masked] (Raymond D. Frost)
Date: Sun, 23 Feb 92 21:33:06 -0800

I would like to store blocks of text with hard carriage returns.
The following seems to work for interactive appends from the 
keyboard.  How would I achieve the same result reading the text
from a file using the "copy from" command?  I've tried several
variations but am unable to get the newline characters read in
properly.

* create para (fill = text[]) \g

* append para (fill = "{line one \\n line two \\n line three}") \g

* retrieve (para.fill) \g

Query sent to backend is "retrieve (para.fill) "
---------------
| fill        |
---------------
| {"line one 
 line two 
 line three"}|
---------------

Raymond Frost
University of Miami

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 25 Feb 92 11:20:20 PST

> Query sent to backend is "retrieve (para.fill) "

First, you don't really need a variable length array of text since
text itself can is variable length.  I did the following:

	create para (fill = text)
	copy para from "/u/mer/pg/bin/para.copy"

where para.copy looks like:

line 4\
line 5\
line 6

and was able to get newlines into the text attribute.

Jeff Meredith
[email-masked]