Skip site navigation (1) Skip section navigation (2)

question on accessing PostgreSQL with C

From: hoelc <hoelc(at)pd(dot)jaring(dot)my>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: question on accessing PostgreSQL with C
Date: 1999-02-07 00:45:22
Message-ID: (view raw or whole thread)
Lists: pgsql-interfaces
I'm a newbee in PostgreSQL, Linux world.  Currently facing some problem
in building a simple application.  I'm trying to write a C program that
get input from user, then update (insert / change) the database, or
retrieve selected data.

(1)  Where to get more example of communicating with PostgreSQL with C

(2)  How to put variables into the SQL?
        I use C program to access PostgreSQL with libpq, and use PQexec(
) to send the query. One of the failed example of mine,
           /* get input from user, a string and an integer */
        PQexec(conn,"insert into NameList (name,id) values
           /* I'm trying to put variables of string and integer into the
query */

(3)  How to check who are the users in PostgreSQL system?

Please advise.
Thanks & Regards,


pgsql-interfaces by date

Next:From: James ThompsonDate: 1999-02-07 01:16:14
Subject: Re: [INTERFACES] question on accessing PostgreSQL with C
Previous:From: Pete (Linux)Date: 1999-02-06 23:45:23
Subject: JDBC-JServ Servlet problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group