Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id AAA06444 for postgres-redist; Wed, 21 Sep 1994 00:50:06 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199409210750.AAA06444@nobozo.CS.Berkeley.EDU> Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.37.53]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with ESMTP id AAA06434 for ; Wed, 21 Sep 1994 00:50:05 -0700 Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.9/8.1B) with SMTP id AAA06895; Wed, 21 Sep 1994 00:50:02 -0700 Message-Id: <199409210750.AAA06895@faerie.CS.Berkeley.EDU> X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol From: aoki@cs.berkeley.edu (Paul M. Aoki) To: pmamnani@cs.nmsu.edu (Praveen Mamnani) Cc: postgres@postgres.Berkeley.EDU Subject: Re: append Reply-To: aoki@cs.berkeley.edu (Paul M. Aoki) In-reply-to: Your message of Wed, 21 Sep 1994 01:01:08 -0600 <199409210701.BAA19997@NMSU.Edu> Date: Wed, 21 Sep 94 00:49:56 -0700 X-Sender: aoki@postgres.Berkeley.EDU Resent-To: postgres-redist@postgres.Berkeley.EDU X-Mts: smtp Resent-Date: Wed, 21 Sep 94 00:50:06 -0700 Resent-XMts: smtp pmamnani@cs.nmsu.edu (Praveen Mamnani) writes: > PQexec("append Info (name=""david"", login=""dwill"", age=20)"); > I have to put the double quotes around the name and login otherwise > I get a syntax error. the way to escape the double-quote character in C is to use a backslash: PQexec("append Info (name=\"david\", login=\"dwill\", age=20)"); try this: faerie:aoki (149)> cat foo.c main() { printf("%s\n", "this""is""my""string"); printf("%s\n", "this\"is\"my\"string"); } faerie:aoki (150)> cc foo.c faerie:aoki (151)> a.out thisismystring this"is"my"string faerie:aoki (152)> -- 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. ==============================================================================