Postgresql C/C ++ API and postgresql sqlapi
1. postgresql learning uri recommendation
http://www.php100.com/manual/PostgreSQL8/
http://www.php100.com/manual/PostgreSQL8/reference.html
http://www.yiibai.com/html/postgresql/
[Note tips byRuiy, distinguish uri/url, service/server,There has a certain truthChillax!]
Friends all stunned-> lithe Ruiy the story;
2. PostgreSQL linux distributionV ins and simple SQL Ruiy are not mentioned here, mainly because of the peering ing between OSUser and PostgreSQL users on the linux platform;
3. Simple API practices for PostgreSQL C/C ++
Postgresql C/C ++ APIs mainly use libpq * lib;
<1,> 1. Connect to the local device
Postgresql rui library, rui user, 321 password, default port pgsql 5432, codeExample:
2, compile and run;
<2,> 1. Create a table
CodeExample
2, compile and run;
<3,> 1. Insert data into the table
CodeExample
2, compileCodeExample
End byRuiy;
What is c api?
An API is a programming interface provided by other applications for programmers. You can use these interfaces to modify some behaviors of the original application (you can use the API to compile a plug-in for the original application ), the preceding C indicates that these interfaces can be called by a program written in C.
Connect c/c ++ to postgresql
PostgreSQL C Library: libpg can be used
Attached to the PostgreSQL installation package
Or install the PostgreSQL ODBC driver and connect to PostgreSQL through the ODBC standard functions.
If you use C ++/CLI, you can also use ADO. NET, etc.