Re: constants for return value from PQftype? - Mailing list pgsql-general

From Tom Lane
Subject Re: constants for return value from PQftype?
Date
Msg-id 23304.1010499724@sss.pgh.pa.us
Whole thread Raw
In response to constants for return value from PQftype?  (Adam Haberlach <adam@newsnipple.com>)
List pgsql-general
Adam Haberlach <adam@newsnipple.com> writes:
> First, I had to modify PoPy.h so that it would not include
> <postgres.h> and <catalog/pg_type.h>, which don't seem to be
> moved into the normal include path by the install.

See "make install-all-headers".  You definitely need pg_type.h
for those constants.

This line looks pretty darn fragile:

    ftype = (ftype>1000 && ftype < 1028?PG_ARRAY:ftype);

A hardwired test on type OID range might or might not be wrong today,
but it will assuredly be wrong in future.

            regards, tom lane

pgsql-general by date:

Previous
From: "Clark C . Evans"
Date:
Subject: database count and creating from template
Next
From: "Clark C . Evans"
Date:
Subject: Re: database count and creating from template