agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Paul M. Aoki <aoki@cs.berkeley.edu>
To: Praveen Mamnani <pmamnani@cs.nmsu.edu>
Cc: postgres@postgres.Berkeley.EDU
Subject: libpq append
Date: Fri, 16 Sep 94 16:31:38 -0700
Message-ID: <199409162331.QAA01962@faerie.CS.Berkeley.EDU> (raw)
In-Reply-To: <199409162308.RAA29779@NMSU.Edu>
pmamnani@cs.nmsu.edu (Praveen Mamnani) writes:
> I tried PQexec("append..."),
> but this does not seem to work. I am not sure that libpq allows
> execution of such queries using PQexec.
it does, and by-and-large it works. (this example maximizes
minimality rather than correctness.)
faerie:postgres (7)> cat foo.c
main()
{
(void) PQsetdb("foo");
(void) PQexec("create bar (x=int4)");
(void) PQexec("append bar (x=5)");
(void) PQfinish();
}
faerie:postgres (8)> cc foo.c /private/devel/postgres/lib/libpq.a
faerie:postgres (9)> a.out
faerie:postgres (10)> monitor -c 'retrieve (bar.all)' foo
---------------
| x |
---------------
| 5 |
---------------
faerie:postgres (11)>
there are examples of retrieving rows in the reference manual and
under src/regress.
--
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.
==============================================================================
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: aoki@cs.berkeley.edu, pmamnani@cs.nmsu.edu
Subject: Re: libpq append
In-Reply-To: <199409162331.QAA01962@faerie.CS.Berkeley.EDU>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox