Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-15 Thread Andrew Dunstan
On 01/13/2012 07:09 PM, Alex Hunsaker wrote: On Fri, Jan 13, 2012 at 16:07, Andrew Dunstan wrote: On 01/12/2012 09:28 PM, Alex Hunsaker wrote: Util.c/o not depending on plperl_helpers.h was also throwing me for a loop so I fixed it and SPI.c... Thoughts? Basically looks good, but I'm conf

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-13 Thread Alex Hunsaker
On Fri, Jan 13, 2012 at 16:07, Andrew Dunstan wrote: > > > On 01/12/2012 09:28 PM, Alex Hunsaker wrote: >> >> Util.c/o not depending on plperl_helpers.h was also throwing me for a loop >> so I fixed it and SPI.c... Thoughts? > > > Basically looks good, but I'm confused by this: > >   do language p

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-13 Thread Andrew Dunstan
On 01/12/2012 09:28 PM, Alex Hunsaker wrote: Util.c/o not depending on plperl_helpers.h was also throwing me for a loop so I fixed it and SPI.c... Thoughts? Basically looks good, but I'm confused by this: do language plperl $$ elog('NOTICE', ${^TAINT}); $$; Why is NOTICE quoted here?

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-12 Thread Alex Hunsaker
On Fri, Jan 6, 2012 at 14:05, Tom Lane wrote: > Alex Hunsaker writes: >> Oh my... I dunno exactly what I was smoking last night, but its a good >> thing I didn't share :-). Uh so my test program was also completely >> wrong, Ill have to redo it all. I've narrowed it down to: >>         if ((type

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-06 Thread Tom Lane
Alex Hunsaker writes: > Oh my... I dunno exactly what I was smoking last night, but its a good > thing I didn't share :-). Uh so my test program was also completely > wrong, Ill have to redo it all. I've narrowed it down to: > if ((type == SVt_PVGV || SvREADONLY(sv))) > { >

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-06 Thread Andrew Dunstan
On 01/06/2012 02:02 PM, Alex Hunsaker wrote: 3. The above is in any case almost certainly insufficient, because in my tests a typeglob didn't trigger SvREADONLY(), but did cause a crash. Hrm the glob I was testing was *STDIN. It failed to fail in my test program because I was not testing *STDI

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-06 Thread Alex Hunsaker
On Fri, Jan 6, 2012 at 06:34, Andrew Dunstan wrote: >> PFA that copies if its readonly and its not a scalar. >> >> I didn't bother adding regression tests-- should I have? > I have several questions. > > 1. How much are we actually saving here? newSVsv() ought to be pretty cheap, > no? I imagine

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-06 Thread Andrew Dunstan
On 01/06/2012 10:49 AM, Alvaro Herrera wrote: Excerpts from Andrew Dunstan's message of vie ene 06 10:34:30 -0300 2012: And yes, we should possibly add a regression test or two. Of course, we can't use the cause of the original complaint ($^V) in them, though. Why not? You obviously can't

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-06 Thread Alvaro Herrera
Excerpts from Andrew Dunstan's message of vie ene 06 10:34:30 -0300 2012: > And yes, we should possibly add a regression test or two. Of course, we can't > use the cause of the original complaint ($^V) in them, though. Why not? You obviously can't need output it verbatim, but you could compare

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-06 Thread Andrew Dunstan
On 01/05/2012 10:59 PM, Alex Hunsaker wrote: After further digging I found it chokes on any non scalar (IOW any reference). I attached a simple c program that I tested with 5.8.9, 5.10.1, 5.12.4 and 5.14.2 (for those who did not know about it, perlbrew made testing across all those perls relati

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-05 Thread Alex Hunsaker
On Thu, Jan 5, 2012 at 16:59, Andrew Dunstan wrote: > > > On 01/05/2012 06:31 PM, Alex Hunsaker wrote: >> >> On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan  wrote: >>> >>> Fix breakage from earlier plperl fix. >> I can't help but think this seems a bit inefficient > > So, yes, we should probably ad

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-05 Thread Andrew Dunstan
On 01/05/2012 06:31 PM, Alex Hunsaker wrote: On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan wrote: Fix breakage from earlier plperl fix. Apparently the perl garbage collector was a bit too eager, so here we control when the new SV is garbage collected. I know im a little late to the party...

Re: [HACKERS] [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

2012-01-05 Thread Alex Hunsaker
On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan wrote: > Fix breakage from earlier plperl fix. > > Apparently the perl garbage collector was a bit too eager, so here > we control when the new SV is garbage collected. I know im a little late to the party... I can't help but think this seems a bit in