Postgresql C/C ++ API and postgresql sqlapi

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.