Subject: TEXT with newlines

From: ERIC M MICKELSON <[email-masked]>
Date: Mon, 13 Jun 94 17:09:05 EDT

I have just recently started using postgres so please be patient.
I'm curently experiencing trouble adding text fields using libpq from a
C++ program.  If the "C" string contains newline characters the record
fails to get appended and postgres prints:

WARN:Jun 13 16:55:27:*** scanner error: Unterminated char/string
constant

I need to get these newline characters stored or else store every line
as a different text array element (blah).  I'm sure I am missing
something simple, but please help if you can.

Thanks

------------------------------------------------------------------
Eric Mickelson                                  mail-stop: LSO-284
Lockheed Space Operations Co.                phone: (407) 861-7509
1100 Lockheed Way            
Titusville, FL 32780      e-mail: [email-masked]
------------------------------------------------------------------

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 13 Jun 94 14:33:46 -0700

> something simple, but please help if you can.

an undocumented parser feature is support for embedding
	\t
	\n
	\r
	\b
	\f
the bad news is that if you try to "copy out" attributes with 
embedded \t or \n, most output routines aren't smart enough to
re-escape the strings.  oops.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki