Summary
This chapter should have given you a good feel for how to build C applications using ecpg. Don't let the last section throw you off too much—ecpg isn't all that well suited to processing dynamic SQL (at least in comparison to libpq or libpgeasy).
The ecpg preprocessor and library are remarkably well designed for building complete PostgreSQL applications quickly.
If you don't need to process dynamic queries, I think that ecpg is the quickest and easiest way to connect a C application to a PostgreSQL database. If you do need to handle dynamic queries, you should consider coding the static parts of your application using ecpg and using libpq (or libpgeasy) for the dynamic parts.
Most of the features in ecpg come from the SQL3 standard and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access