Glynn Clements glynn.clements at virgin.net
Thu Nov 28 07:23:42 EST 2002

Markus Neteler wrote:

> the recent updates to the configure[.in] of 5.1 have
> eliminated HAVE_POSTGRES. At time there is only
> HAVE_POSTGRES_H supported:
> include/config.h
> /* define if postgres exists */
> /* #undef HAVE_POSTGRES */
> #define HAVE_POSTGRES_H 1
> Question for Radim and me is if the need both HAVE_POSTGRES and
> HAVE_POSTGRES_H or not? If not, as configure[.in] now suggests
> we had to update all the spreaded HAVE_POSTGRES in 5.1 code to
> HAVE_POSTGRES_H. No problem of course, but we are not sure what's
> correct.

I suspect that both are necessary.

HAVE_POSTGRES_H indicates that the header file <postgres.h> was found;
older versions of PostgreSQL have <postgres_fe.h> instead (although
config.h.in doesn't include an entry for HAVE_POSTGRES_FE_H).

Note that GRASS probably shouldn't be using either of these headers;
they concern server internals and, AFAICT, are only meant for use by
extensions to the server. Clients should normally only need
<libpq-fe.h>. In 5.0.0, those headers are only used by g.column.pg to
obtain the value of VARHDRSZ (and that dependendency has been removed
from the CVS head).

Presumably HAVE_POSTGRES was meant to reflect whether PostgreSQL
support was enabled (i.e. --with-postgres, which is the default). In
which case, I appear to have overlooked it when I updated

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list