0

I'm trying to find open source applications using PostgreSQL that are written in C/C++ so I can study them. A few open source projects using PostgreSQL are Evergreen ILS, SpamAssassin, and pgpool. However, Evergreen and SpamAssassin are written in Perl, and pgpool (written in C) is a replication tool, not a typical application. Moreover, I looked at the SQL code in Evergreen, and it is quite voluminous and complicated.

Hence, I'm looking for one or more applications using PostgreSQL, preferably those that are somewhat trivial (but not too trivial).

1
  • Note: I ran apt-cache rdepends libpq5 in Ubuntu and got a few results. The most promising one I saw was dovecot. However, like many others, dovecot has its own database library rather than using libpq inline. I'm thinking I would be better off doing what many other projects do and use a wrapper instead of libpq (PostgreSQL's C API). Commented Nov 16, 2009 at 21:00

6 Answers 6

1

seen libpqxx? try asking on its mailing list (but scour their wiki first)

http://pqxx.org/development/libpqxx

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. However, libpqxx is a binding, not an application, meaning its code might not really demonstrate how to use libpq in the context of business logic.
yup. that's why i didn't simply point you at it. it's a c++ library to access postgresql, you're bound to find a few oss applications mentioned in the wiki and/or mailing list archives.
1

pgAdmin is written using c++ using wxwidgets.

Comments

1

how about pgAdmin 3 ?

Also, you may find Qt4 a very easy way interact with databases programming in C++. http://doc.trolltech.com/4.6-snapshot/sql-programming.html

Comments

0

Have you searched through the projects at http://pgfoundry.org ?

Comments

0

Two examples that are open-source:

Comments

0

It's pretty big, but the KDE Project's Amarok is written in C++ and can use a PgSQL backend (among several others). While it's pretty large, you may be able to find some interesting things in the database code. Since it uses a pre-defined schema (as opposed to the extremely general types of access that something like pgAdmin uses) it may have some good things to teach you. It will definitely be easier to pick apart than Evergreen, which actually has an entire middleware layer that actually does the data access through exposed services (The OpenSRF Project).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.