Am 05.10.2019 um 18:04 schrieb Justin Pryzby:
On Sat, Oct 05, 2019 at 04:48:40PM +0200, Christoph Zwerschke wrote:
Find attached minimal patch.
Thank you, looks fine. I've already added docs and tests as well, but not
yet committed to trunk.
I didn't mean you had to stop and do that - I hammered it out while waiting for
pg_checksums to run :)
And I just had some spare time and was working on PyGres anyway :)
Good idea. But I wonder whether it should be a property, which you suggested
before for types of queryResult columns (for which I sent a WIP patches July 19
and 20).
I thought about that. But this is a module level function and there are
no module level properties in Python. Maybe we could use PEP 549 or
PEP562, but these require Python 3.7. We could provide it as an
attribute but that means we need to initialize it by making a call once
when importing.
|$ PYTHONPATH=build/lib.linux-x86_64-2.7/ python2.7 -c "import pg; print
pg.DB('postgres').query('SELECT generate_series(1,9999)').memsize()"
|Traceback (most recent call last):
| File "<string>", line 1, in <module>
| File "pg.py", line 27, in <module>
| from _pg import *
|ImportError: /home/pryzbyj/src/pygres/build/lib.linux-x86_64-2.7/_pg.so:
undefined symbol: PQresultMemorySize
Are you sure you compiled that with the pgconfig.h of Postgres 12?
setup.py is using the includes specified by the pgconfig tool.
-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo/pygresql