Thread: Sample Program
Greetings:
I have so far been unsuccessful in my searches. Does someone have a very small sample of a C/C++ program to read some data out of a Postgresql database and insert a new record?
Any help appreciated.
Thanks
Chris
There was an example of using libpq with C in Bruce's book: http://www.postgresql.org/docs/awbook.html it was chapter 17, section 1, but it might have changed. Adam Lang Systems Engineer Rutgers Casualty Insurance Company ----- Original Message ----- From: "Mulcahy, Chris" <cmulcahy@vivius.com> To: <pgsql-general@postgresql.org> Sent: Wednesday, November 01, 2000 2:28 PM Subject: [GENERAL] Sample Program > Greetings: > > I have so far been unsuccessful in my searches. Does someone have a very > small sample of a C/C++ program to read some data out of a Postgresql > database and insert a new record? > > Any help appreciated. > > Thanks > Chris >
If you want to go one step further & learn Java, I can supply several examples using Java & JDBC... Also try going to this link & look for instructions on getting the examples rpm if you are on RH: http://www.linuxdoc.org/HOWTO/PostgreSQL-HOWTO-6.html#ss6.4 I don't know if C is among the examples, but this is where I got some Java samples... -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Mulcahy, Chris Sent: Wednesday, November 01, 2000 2:28 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Sample Program Greetings: I have so far been unsuccessful in my searches. Does someone have a very small sample of a C/C++ program to read some data out of a Postgresql database and insert a new record? Any help appreciated. Thanks Chris
On Wed, Nov 01, 2000 at 02:53:12PM -0500, Adam Lang wrote: > There was an example of using libpq with C in Bruce's book: > http://www.postgresql.org/docs/awbook.html > > it was chapter 17, section 1, but it might have changed. Also, you can fetch this book in PDF format (for example once per week) It is good, but still incomplete, source of PostgreSQL information. But week-by-week it becomes better :-) -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744
Found examples in: http://www.postgresql.org/docs/aw_pgsql_book/node188.html These include the techniques that I use at home and have had "few" problems. Have fun. > -----Original Message----- > From: Nick Fankhauser [mailto:nickf@ontko.com] > Sent: Wednesday, November 01, 2000 7:58 PM > To: pgsql-general; Mulcahy, Chris > Subject: RE: [GENERAL] Sample Program > > > If you want to go one step further & learn Java, I can supply several > examples using Java & JDBC... > > Also try going to this link & look for instructions on > getting the examples > rpm if you are on RH: > > http://www.linuxdoc.org/HOWTO/PostgreSQL-HOWTO-6.html#ss6.4 > > I don't know if C is among the examples, but this is where I > got some Java > samples... > > > > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Mulcahy, Chris > Sent: Wednesday, November 01, 2000 2:28 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Sample Program > > > Greetings: > I have so far been unsuccessful in my searches. Does someone > have a very > small sample of a C/C++ program to read some data out of a Postgresql > database and insert a new record? > Any help appreciated. > Thanks > Chris >
> On Wed, Nov 01, 2000 at 02:53:12PM -0500, Adam Lang wrote: > > There was an example of using libpq with C in Bruce's book: > > http://www.postgresql.org/docs/awbook.html > > > > it was chapter 17, section 1, but it might have changed. > Also, you can fetch this book in PDF format (for example once per week) > It is good, but still incomplete, source of PostgreSQL information. > But week-by-week it becomes better :-) Actually, it is done, and has been for a few months. Should be for sale in a week or so. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026