
I installed HDBC, but when I tried running a simple program that used it, I get the error message
ghc-6.6: /usr/local/lib/HDBC-postgresql-1.0.1.0/ghc-6.6/HSHDBC-postgresql-1.0.1.0.o: unknown symbol `PQserverVersion'
Ah, I figured it out. The PQserverVersion function is documented in the PostgreSQL 8.0 and 8.1 manuals as follows: "Applications may use this to determine the version of the database server they are connected to. The number is formed by converting the major, minor, and revision numbers into two-decimal-digit numbers and appending them together. For example, version 7.4.2 will be returned as 70402, and version 8.1 will be returned as 80100 (leading zeroes are not shown). Zero is returned if the connection is bad." You'd think, from the description, that the libpq for PostgreSQL 7.4 would also have this function. But it doesn't.