From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Adam Haberlach <adam(at)newsnipple(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: constants for return value from PQftype? |
Date: | 2002-01-08 14:47:16 |
Message-ID: | 3C3B0674.125116A1@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I'm trying to build the PoPy PostgreSQL/Python interface so that
> I can use PostgreSQL with Zope, and I'm having some problems:
...
> ././PoPy.c: In function `PoPy_converter':
> ././PoPy.c:77: `BOOLOID' undeclared (first use in this function)
...
> I looked through the headers and the documentation. the PG_xxx constants
> don't seem to be in the the user include files. I can't seem to find PQftype in
> the documentation, or any hint as to what it should be returning. Shouldn't
> these constants, or something like them be somewhere in the include files?
These values are not *guaranteed* to be constants across PostgreSQL
releases (though in fact they tend to stay the same). It is possible to
query the database to find them on connection startup (then populate a
Python dictionary with them for lookup?), or you can hardcode them in as
your current code does. As you noted the definitions are not considered
part of client-side code so were removed from the include files.
Are you building PostgreSQL from sources? If so, the definitions are
available in the backend catalog header files...
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Roderick A. Anderson | 2002-01-08 14:57:05 | [Q] Windows, ODBC, SSL |
Previous Message | Tom Lane | 2002-01-08 14:22:04 | Re: constants for return value from PQftype? |