Lists: | pgsql-committerspgsql-hackers |
---|
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-05 17:56:47 |
Message-ID: | E1RXcmV-0000n6-6u@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
plpython: Add SPI cursor support
Add a function plpy.cursor that is similar to plpy.execute but uses an
SPI cursor to avoid fetching the entire result set into memory.
Jan Urbański, reviewed by Steve Singer
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/89e850e6fda9e4e441712012abe971fe938d595a
Modified Files
--------------
doc/src/sgml/plpython.sgml | 81 +++
src/pl/plpython/expected/plpython_spi.out | 151 +++++
.../plpython/expected/plpython_subtransaction.out | 66 ++
.../expected/plpython_subtransaction_0.out | 70 +++
.../expected/plpython_subtransaction_5.out | 70 +++
src/pl/plpython/expected/plpython_test.out | 6 +-
src/pl/plpython/plpython.c | 642 ++++++++++++++++++++
src/pl/plpython/sql/plpython_spi.sql | 116 ++++
src/pl/plpython/sql/plpython_subtransaction.sql | 52 ++
9 files changed, 1251 insertions(+), 3 deletions(-)
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-05 18:11:54 |
Message-ID: | 201112051811.pB5IBso22321@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Peter Eisentraut wrote:
> plpython: Add SPI cursor support
>
> Add a function plpy.cursor that is similar to plpy.execute but uses an
> SPI cursor to avoid fetching the entire result set into memory.
>
> Jan Urba?ski, reviewed by Steve Singer
I assume this is _not_ related to this TODO item:
Add a DB-API compliant interface on top of the SPI interface
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Jan Urbaski <wulczer(at)wulczer(dot)org> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [COMMITTERS] pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-06 18:23:30 |
Message-ID: | 12744.1323195810@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> plpython: Add SPI cursor support
Buildfarm member narwhal does not like this patch. It looks like
"PyObject_SelfIter" is not a compile-time constant on its version
of python (2.5, apparently).
regards, tom lane
From: | Jan Urbański <wulczer(at)wulczer(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [COMMITTERS] pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-06 18:33:52 |
Message-ID: | 4EDE6010.6070001@wulczer.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 06/12/11 19:23, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> plpython: Add SPI cursor support
>
> Buildfarm member narwhal does not like this patch. It looks like
> "PyObject_SelfIter" is not a compile-time constant on its version
> of python (2.5, apparently).
Hm, I quickly tried with a self-compiled Python 2.5.6 from the upstream
tarball and it compiled on my Linux machine.
I see that PyObject_SelfIter is defined here:
http://hg.python.org/cpython/file/b48e1b48e670/Include/object.h#l407
I'll try to dig around to see what can be causing that...
Cheers,
Jan
From: | Jan Urbański <wulczer(at)wulczer(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [COMMITTERS] pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-07 10:16:54 |
Message-ID: | 4EDF3D16.7080303@wulczer.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 06/12/11 19:33, Jan Urbański wrote:
> On 06/12/11 19:23, Tom Lane wrote:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>> plpython: Add SPI cursor support
>>
>> Buildfarm member narwhal does not like this patch. It looks like
>> "PyObject_SelfIter" is not a compile-time constant on its version
>> of python (2.5, apparently).
>
> I'll try to dig around to see what can be causing that...
Seems that PyObject_GenericGetIter has been renamed to PyObject_SelfIter
at some point:
http://hg.python.org/cpython/rev/fd5ef7003469
I'm trying to muster whatever mercurial-foo I have to check if there's
been a 2.5 version tagged without that patch...
Jan
From: | Jan Urbański <wulczer(at)wulczer(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [COMMITTERS] pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-07 10:41:03 |
Message-ID: | 4EDF42BF.6070204@wulczer.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 07/12/11 11:16, Jan Urbański wrote:
> On 06/12/11 19:33, Jan Urbański wrote:
>> On 06/12/11 19:23, Tom Lane wrote:
>>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>>> plpython: Add SPI cursor support
>>>
>>> Buildfarm member narwhal does not like this patch. It looks like
>>> "PyObject_SelfIter" is not a compile-time constant on its version
>>> of python (2.5, apparently).
>>
>> I'll try to dig around to see what can be causing that...
>
> Seems that PyObject_GenericGetIter has been renamed to PyObject_SelfIter
> at some point:
>
> http://hg.python.org/cpython/rev/fd5ef7003469
>
> I'm trying to muster whatever mercurial-foo I have to check if there's
> been a 2.5 version tagged without that patch...
So no, the renaming happened on Mar 17 2003 and 2.5 was tagged on
Sep 18 2006. The source tarball for 2.5 contains PyObject_SelfIter.
Both fennec and mastodon build OK with Python 2.5. Is it possible that
narwhal's Python installation is in some way broken?
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-committers(at)postgresql(dot)org, Jan Urbański <wulczer(at)wulczer(dot)org>, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-14 21:46:58 |
Message-ID: | 4EE91952.5080600@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 12/05/2011 12:56 PM, Peter Eisentraut wrote:
> plpython: Add SPI cursor support
>
> Add a function plpy.cursor that is similar to plpy.execute but uses an
> SPI cursor to avoid fetching the entire result set into memory.
>
> Jan Urbański, reviewed by Steve Singer
>
>
This commit apparently caused a problem on buildfarm narwhal, which has
been failing for 8 days without anyone paying attention. See
<http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=narwhal&dt=2011-12-14%2017%3A00%3A02>:
plpython.c:3163: error: initializer element is not constant
plpython.c:3163: error: (near initialization for `PLy_CursorType.tp_iter')
make[3]: *** [plpython.o] Error 1
Can someone please investigate?
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Jan Urbański <wulczer(at)wulczer(dot)org>, Steve Singer <ssinger(at)ca(dot)afilias(dot)info>, dpage(at)postgresql(dot)org |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2011-12-14 23:36:28 |
Message-ID: | 18526.1323905788@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 12/05/2011 12:56 PM, Peter Eisentraut wrote:
>> plpython: Add SPI cursor support
> This commit apparently caused a problem on buildfarm narwhal, which has
> been failing for 8 days without anyone paying attention.
Um, yes, some of us noticed:
http://archives.postgresql.org/pgsql-hackers/2011-12/msg00264.php
Apparently, nobody has any idea what's wrong or how to fix it, because
it works fine with other copies of python 2.5. What we need to know is
what's different about narwhal's version. Dave, any ideas?
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Jan Urbański <wulczer(at)wulczer(dot)org> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info>, Dave Page <dpage(at)pgadmin(dot)org> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 15:35:06 |
Message-ID: | 4F0B092A.7000301@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 12/14/2011 06:43 PM, Jan Urbański wrote:
> ----- Original message -----
>> On 12/05/2011 12:56 PM, Peter Eisentraut wrote:
>>> plpython: Add SPI cursor support
>>>
>>> Add a function plpy.cursor that is similar to plpy.execute but uses an
>>> SPI cursor to avoid fetching the entire result set into memory.
>>>
>>> Jan Urbański, reviewed by Steve Singer
>>>
>>>
>> This commit apparently caused a problem on buildfarm narwhal, which has
>> been failing for 8 days without anyone paying attention. See
>> <http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=narwhal&dt=2011-12-14%2017%3A00%3A02>:
> I did some investigation after this has been committed and couldn't come up with a reasonable explanation (not at my PC at the moment, can't find the relevant thread).
>
> Can we check if PyObject_SelfIter is defined in Include/object.h in the Python install dir on that machine? If yes, then this looks like a MinGW quirk, which I'll do my best to investigate, but I don't have easy access to a Windows machine with a mingw toolchain...
Dave,
this is your machine. It's been failing for 34 days now. Could you
please follow up?
cheers
andrew
From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 15:52:51 |
Message-ID: | CA+OCxoz7yoDryU-xO5pCNqsYvz4-0C4_hhKpqzapAZQSWKbTGg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Mon, Jan 9, 2012 at 3:35 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
>
> On 12/14/2011 06:43 PM, Jan Urbański wrote:
>>
>> ----- Original message -----
>>>
>>> On 12/05/2011 12:56 PM, Peter Eisentraut wrote:
>>>>
>>>> plpython: Add SPI cursor support
>>>>
>>>> Add a function plpy.cursor that is similar to plpy.execute but uses an
>>>> SPI cursor to avoid fetching the entire result set into memory.
>>>>
>>>> Jan Urbański, reviewed by Steve Singer
>>>>
>>>>
>>> This commit apparently caused a problem on buildfarm narwhal, which has
>>> been failing for 8 days without anyone paying attention. See
>>> <http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=narwhal&dt=2011-12-14%2017%3A00%3A02>:
>>
>> I did some investigation after this has been committed and couldn't come up with a reasonable explanation (not at my PC at the moment, can't find the relevant thread).
>>
>> Can we check if PyObject_SelfIter is defined in Include/object.h in the Python install dir on that machine? If yes, then this looks like a MinGW quirk, which I'll do my best to investigate, but I don't have easy access to a Windows machine with a mingw toolchain...
>
>
> Dave,
>
> this is your machine. It's been failing for 34 days now. Could you please follow up?
Yes, it's defined as such:
PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 16:43:51 |
Message-ID: | 4F0B1947.3090802@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 01/09/2012 10:52 AM, Dave Page wrote:
> On Mon, Jan 9, 2012 at 3:35 PM, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>>
>>
>> On 12/14/2011 06:43 PM, Jan Urbański wrote:
>>> ----- Original message -----
>>>> On 12/05/2011 12:56 PM, Peter Eisentraut wrote:
>>>>> plpython: Add SPI cursor support
>>>>>
>>>>> Add a function plpy.cursor that is similar to plpy.execute but uses an
>>>>> SPI cursor to avoid fetching the entire result set into memory.
>>>>>
>>>>> Jan Urbański, reviewed by Steve Singer
>>>>>
>>>>>
>>>> This commit apparently caused a problem on buildfarm narwhal, which has
>>>> been failing for 8 days without anyone paying attention. See
>>>> <http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=narwhal&dt=2011-12-14%2017%3A00%3A02>:
>>> I did some investigation after this has been committed and couldn't come up with a reasonable explanation (not at my PC at the moment, can't find the relevant thread).
>>>
>>> Can we check if PyObject_SelfIter is defined in Include/object.h in the Python install dir on that machine? If yes, then this looks like a MinGW quirk, which I'll do my best to investigate, but I don't have easy access to a Windows machine with a mingw toolchain...
>>
>> Dave,
>>
>> this is your machine. It's been failing for 34 days now. Could you please follow up?
> Yes, it's defined as such:
>
> PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
>
>
>
Hmm. Well, at this stage I'm slightly inclined to say it's a compiler
problem. That's a pretty old compiler. If you can't upgrade it maybe you
should just take --with-python out of the buildfarm settings.
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Dave Page <dpage(at)pgadmin(dot)org>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 16:57:26 |
Message-ID: | 28255.1326128246@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 01/09/2012 10:52 AM, Dave Page wrote:
>> Yes, it's defined as such:
>> PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
> Hmm. Well, at this stage I'm slightly inclined to say it's a compiler
> problem. That's a pretty old compiler. If you can't upgrade it maybe you
> should just take --with-python out of the buildfarm settings.
I'm wondering what PyAPI_FUNC() expands to on Dave's machine. In my
copy of pyport.h, there's a rat's nest of cygwin-related tests that may
or may not lead to including "extern" and/or "__declspec" in that macro.
I think possibly the wrong combination might lead to failures of this
ilk?
regards, tom lane
From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 17:06:54 |
Message-ID: | CA+OCxoxioBSmQuwnePtQAz0mpeby0rs9Em-f6K088op8bEhTtA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Mon, Jan 9, 2012 at 4:57 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 01/09/2012 10:52 AM, Dave Page wrote:
>>> Yes, it's defined as such:
>>> PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
>
>> Hmm. Well, at this stage I'm slightly inclined to say it's a compiler
>> problem. That's a pretty old compiler. If you can't upgrade it maybe you
>> should just take --with-python out of the buildfarm settings.
>
> I'm wondering what PyAPI_FUNC() expands to on Dave's machine. In my
> copy of pyport.h, there's a rat's nest of cygwin-related tests that may
> or may not lead to including "extern" and/or "__declspec" in that macro.
> I think possibly the wrong combination might lead to failures of this
> ilk?
Is there a way I can get gcc to spit out the expanded definition in a
readable format that you know of?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 17:13:51 |
Message-ID: | CAEYLb_WYvHww3P_xxbK7=3Tq165=W4zvA2xs4v7vgdHSF7mjtA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 9 January 2012 17:06, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Is there a way I can get gcc to spit out the expanded definition in a
> readable format that you know of?
Yes. Figure out what flags gcc is given when building the TU. Then,
add the -E flag and see what is generated:
http://www.network-theory.co.uk/docs/gccintro/gccintro_36.html
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
Cc: | Dave Page <dpage(at)pgadmin(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 17:32:51 |
Message-ID: | 4F0B24C3.2070409@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 01/09/2012 12:13 PM, Peter Geoghegan wrote:
> On 9 January 2012 17:06, Dave Page<dpage(at)pgadmin(dot)org> wrote:
>> Is there a way I can get gcc to spit out the expanded definition in a
>> readable format that you know of?
> Yes. Figure out what flags gcc is given when building the TU. Then,
> add the -E flag and see what is generated:
>
> http://www.network-theory.co.uk/docs/gccintro/gccintro_36.html
Yeah, something like
gcc -E -I/usr/include/python2.7/ -include Python.h
/usr/include/python2.7/object.h
adjusted for your paths should do it.
cheers
andrew
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Jan Urbański <wulczer(at)wulczer(dot)org>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-09 18:05:56 |
Message-ID: | 1326132356.12723.1.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On mån, 2012-01-09 at 17:06 +0000, Dave Page wrote:
> Is there a way I can get gcc to spit out the expanded definition in a
> readable format that you know of?
make plpy_cursorobject.i
From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-10 09:56:30 |
Message-ID: | CA+OCxoxfYdN+bGUURe0eW8yD=aEKTe=3RtWZqH1bm=j2S8Mivg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Mon, Jan 9, 2012 at 5:32 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 01/09/2012 12:13 PM, Peter Geoghegan wrote:
>>
>> On 9 January 2012 17:06, Dave Page<dpage(at)pgadmin(dot)org> wrote:
>>>
>>> Is there a way I can get gcc to spit out the expanded definition in a
>>> readable format that you know of?
>>
>> Yes. Figure out what flags gcc is given when building the TU. Then,
>> add the -E flag and see what is generated:
>>
>> http://www.network-theory.co.uk/docs/gccintro/gccintro_36.html
>
>
>
> Yeah, something like
>
> gcc -E -I/usr/include/python2.7/ -include Python.h
> /usr/include/python2.7/object.h
>
> adjusted for your paths should do it.
Thanks - pfa.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
py.txt.gz | application/x-gzip | 21.5 KB |
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-10 14:28:58 |
Message-ID: | 4F0C4B2A.7050601@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 01/10/2012 04:56 AM, Dave Page wrote:
> On Mon, Jan 9, 2012 at 5:32 PM, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>>
>> On 01/09/2012 12:13 PM, Peter Geoghegan wrote:
>>> On 9 January 2012 17:06, Dave Page<dpage(at)pgadmin(dot)org> wrote:
>>>> Is there a way I can get gcc to spit out the expanded definition in a
>>>> readable format that you know of?
>>> Yes. Figure out what flags gcc is given when building the TU. Then,
>>> add the -E flag and see what is generated:
>>>
>>> http://www.network-theory.co.uk/docs/gccintro/gccintro_36.html
>>
>>
>> Yeah, something like
>>
>> gcc -E -I/usr/include/python2.7/ -include Python.h
>> /usr/include/python2.7/object.h
>>
>> adjusted for your paths should do it.
> Thanks - pfa.
which contains:
__attribute__((dllimport)) PyObject * PyObject_SelfIter(PyObject *);
The result is identical on frogmouth, which builds happily using gcc
4.5.0. So this does look like a compiler quirk.
cheers
andrew
From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org, Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
Subject: | Re: pgsql: plpython: Add SPI cursor support |
Date: | 2012-01-10 14:30:37 |
Message-ID: | CA+OCxozr=0wkQDF7kfd2n-bJQOwdSUs0Myohg29pA_U5=2pfqA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Tue, Jan 10, 2012 at 2:28 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 01/10/2012 04:56 AM, Dave Page wrote:
>>
>> On Mon, Jan 9, 2012 at 5:32 PM, Andrew Dunstan<andrew(at)dunslane(dot)net>
>> wrote:
>>>
>>>
>>> On 01/09/2012 12:13 PM, Peter Geoghegan wrote:
>>>>
>>>> On 9 January 2012 17:06, Dave Page<dpage(at)pgadmin(dot)org> wrote:
>>>>>
>>>>> Is there a way I can get gcc to spit out the expanded definition in a
>>>>> readable format that you know of?
>>>>
>>>> Yes. Figure out what flags gcc is given when building the TU. Then,
>>>> add the -E flag and see what is generated:
>>>>
>>>> http://www.network-theory.co.uk/docs/gccintro/gccintro_36.html
>>>
>>>
>>>
>>> Yeah, something like
>>>
>>> gcc -E -I/usr/include/python2.7/ -include Python.h
>>> /usr/include/python2.7/object.h
>>>
>>> adjusted for your paths should do it.
>>
>> Thanks - pfa.
>
>
>
> which contains:
>
> __attribute__((dllimport)) PyObject * PyObject_SelfIter(PyObject *);
>
>
>
> The result is identical on frogmouth, which builds happily using gcc 4.5.0.
> So this does look like a compiler quirk.
OK, I'll disable Python on Narwhal.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company