agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
double quotes in postgres string
2+ messages / 2 participants
[nested] [flat]

* double quotes in postgres string
@ 1994-09-01 12:03  Bernd Froehlich <bfroehli@AWI-Bremerhaven.DE>
  0 siblings, 1 reply; 2+ messages in thread

From: Bernd Froehlich @ 1994-09-01 12:03 UTC (permalink / raw)
  To: legacy

How do I put double quotes in a postgres string?
I tried to precede them with a backslash but that did not work:
* create test(a=char16)\g

Query sent to backend is "create test(a=char16)"
CREATE
Go 
* append test(a="\"")\g
unknown escape given

Go 
* 
Query sent to backend is "append test(a="")"
APPEND 48924
Go 

==============================================================================
   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: double quotes in postgres string
@ 1994-09-01 15:44  Paul M. Aoki <aoki@cs.berkeley.edu>
  parent: Bernd Froehlich <bfroehli@AWI-Bremerhaven.DE>
  0 siblings, 0 replies; 2+ messages in thread

From: Paul M. Aoki @ 1994-09-01 15:44 UTC (permalink / raw)
  To: Bernd Froehlich <bfroehli@AWI-Bremerhaven.DE>; +Cc: legacy

bfroehli@AWI-Bremerhaven.DE (Bernd Froehlich) writes:
> How do I put double quotes in a postgres string?
> I tried to precede them with a backslash but that did not work:
> * append test(a="\"")\g
> unknown escape given

the monitor uses backslash as its escape character.  use two:
 * append test(a="\\"hello world\\"")\g
--
  Paul M. Aoki          |  University of California at Berkeley
  aoki@CS.Berkeley.EDU  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776

==============================================================================
   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-09-01 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-09-01 12:03 double quotes in postgres string Bernd Froehlich <bfroehli@AWI-Bremerhaven.DE>
1994-09-01 15:44 ` 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