>> I would suggest to fix this, as there are still plenty of people using
>> 7.x...
>
> This is only relevant on Windows, autoconf takes care of it on unix
> platforms.
I strongly suspect that he is not in fact linking against libpq version
8. Is ONLY PQprepare and PQsendPrepare missing? What about the rest?
Gah - Windows. I'm not able to build on windows... I just followed the
existing windows config.w32 which already required PostgreSQL 7.4 or
above libpq (AFAICT). The functions I added require 7.4 or above as well.
There is no difference between 7.4 and 8.0's libpq in terms of functions.
Basically before I made any changes, this was in config.w32:
ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D
HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D
HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS");
Note that that FORCES PQparameterStatus and PQtransactionStatus to be
assumed to exist. Both of those functions are PostgreSQL 7.4 only and
in fact it was Edin himself who added them. All I did was add a bunch
more /D's:
ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D
HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D
HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D
HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D HAVE_PQEXECPREPARED /D
HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE
/D HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND
/D HAVE_PQGETCOPYDATA /D HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA");
However, all those new /D's are also 7.4 only. So I don't see exactly
what I did any differently? If someone wants to make Windows build
against versions pre-7.4, then I don't know how to do it. I just
assumed that whoever came before me knew what they were doing :)
Chris