February 2003
Intermediate to advanced
816 pages
18h 38m
English
In the three previous chapters, you've seen how to connect a C or C++ application to a PostgreSQL database by making function calls into a PostgreSQL API. Now you're going to look at a different method for interfacing C applications with PostgreSQL. The ecpg preprocessor and runtime library enable you to embed SQL commands directly into the source code of your application. Rather than making explicit function calls into PostgreSQL, you include specially tagged SQL statements in your C code. The ecpg preprocessor examines your source code and translates the SQL statements into the function calls needed to carry out the operations that you request. When you run the ecpg preprocessor, you feed ...
Read now
Unlock full access