"Stephen Whinston" <swhinston@pillardata.com> writes:
> gcc -c -I/usr/local/pgsql/include sample.cpp
> aggregate 'PGconn conn' has incomplete type and cannot be initialized
> aggregate 'PGresult res' has incomplete type and cannot be initialized
Where did you get this "sample.cpp" from? It appears to be written
incorrectly.
> Also, a lot of messages seem to indicate that there is sample code
> under the src/ dir. Where is this?
Look in the source-code distribution. I don't believe we install any
sample code; there's no standard place for examples in the usual system
directories.
regards, tom lane