| От | hoelc |
|---|---|
| Тема | question on accessing PostgreSQL with C |
| Дата | |
| Msg-id | 36BBB16D.F0F88A26@pd.jaring.my обсуждение |
| Список | pgsql-interfaces |
Hello,
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.
Questions:
(1) Where to get more example of communicating with PostgreSQL with C
program?
(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 (%s,%d)
.......
:
/* 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,
LCH
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера