agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
TEXT with newlines
2+ messages / 2 participants
[nested] [flat]

* TEXT with newlines
@ 1994-06-13 17:09 ERIC M MICKELSON <emm1@lsdn.ksc.nasa.gov>
  1994-06-13 21:33 ` Re: TEXT with newlines Paul M. Aoki <aoki@CS.Berkeley.EDU>
  0 siblings, 1 reply; 2+ messages in thread

From: ERIC M MICKELSON @ 1994-06-13 17:09 UTC (permalink / raw)
  To: legacy

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: emm1@endeavour.lsdn.ksc.nasa.gov
------------------------------------------------------------------

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: TEXT with newlines
  1994-06-13 17:09 TEXT with newlines ERIC M MICKELSON <emm1@lsdn.ksc.nasa.gov>
@ 1994-06-13 21:33 ` Paul M. Aoki <aoki@CS.Berkeley.EDU>
  0 siblings, 0 replies; 2+ messages in thread

From: Paul M. Aoki @ 1994-06-13 21:33 UTC (permalink / raw)
  To: ERIC M MICKELSON <emm1@lsdn.ksc.nasa.gov>; +Cc: legacy

ERIC M MICKELSON <emm1@lsdn.ksc.nasa.gov> writes:
> 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.

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  |  aoki@CS.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1994-06-13 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-06-13 17:09 TEXT with newlines ERIC M MICKELSON <emm1@lsdn.ksc.nasa.gov>
1994-06-13 21:33 ` Paul M. Aoki <aoki@CS.Berkeley.EDU>

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