Re: [BUGS] plperl & sort

2008-11-04 Thread nathan wagner
Tom Lane wrote: Jeff <[EMAIL PROTECTED]> writes: I've ran into this interesting problem. It seems that while you can call sort() in a trusted plperl func you cannot access $a & $b which effectively makes it useless. I've tested this on 8.2.11, 8.3.5, and the nov 4 snapshot on ftp.postgresql

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 15:17, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > Alex Hunsaker wrote: >> Err no you're right its only builtins that use main:: sort being the >> only one I know of off the top of my head... its a shame >> PLContainer->share('$main::a'); does not seem to work.. >> > > >

Re: [BUGS] plperl & sort

2008-11-04 Thread Andrew Dunstan
Alex Hunsaker wrote: On Tue, Nov 4, 2008 at 15:02, Alex Hunsaker <[EMAIL PROTECTED]> wrote: On Tue, Nov 4, 2008 at 14:43, Andrew Dunstan <[EMAIL PROTECTED]> wrote: But by all means if you can come up with a robust way of allowing the more traditional way of calling sort routines,

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 15:02, Alex Hunsaker <[EMAIL PROTECTED]> wrote: > On Tue, Nov 4, 2008 at 14:43, Andrew Dunstan <[EMAIL PROTECTED]> wrote: But by all means if you can come up with a robust way of allowing >> the more traditional way of calling sort routines, send it in. > > Well its not just

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 15:02, Alex Hunsaker <[EMAIL PROTECTED]> wrote: > The other idea Ive been toying this is instead of calling reval we can > just call Opcode::_safe_call_sv() something like the below: Argh gmail probably ate the whitespace in the patch... see attached plperl_safe.patch Des

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 14:43, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > We need to document that, and given that this exists I think we don't need > to backpatch old versions. Agreed. > Beyond that, we need to be very careful with any "solution" that we don't > upset the moderately fragile se

Re: [BUGS] plperl & sort

2008-11-04 Thread Andrew Dunstan
Alex Hunsaker wrote: On Tue, Nov 4, 2008 at 12:43, Alex Hunsaker <[EMAIL PROTECTED]> wrote: It has something to do with anon subs not sure what... It has to do with us returning the anonymous sub inside of the safe and then calling the function outside of the safe (or at least in a d

Re: [BUGS] plperl & sort

2008-11-04 Thread Jeff
On Nov 4, 2008, at 2:27 PM, Alex Hunsaker wrote: On Tue, Nov 4, 2008 at 09:02, Jeff <[EMAIL PROTECTED]> wrote: I've ran into this interesting problem. It seems that while you can call sort() in a trusted plperl func you cannot access $a & $b which effectively makes it useless. Hrm works f

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 12:43, Alex Hunsaker <[EMAIL PROTECTED]> wrote: > It has something to do with anon subs not sure what... It has to do with us returning the anonymous sub inside of the safe and then calling the function outside of the safe (or at least in a different namespace) we do someth

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 12:39, Tom Lane <[EMAIL PROTECTED]> wrote: > "Alex Hunsaker" <[EMAIL PROTECTED]> writes: >> Hrm works for me if I take out the elog from sort() > > Even more interesting, this variant *doesn't* work: > > regression=# create or replace function trustedsort() > returns int > as

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Dave Page
2008/11/4 Hiroshi Saito <[EMAIL PROTECTED]>: > Furthermore, I think it good to use libpq by which 8.3.5 was released. > So, it is better to pack up 08.03.0310.? > > to Dave and Inoue-san. > What do you think? 08.03.0400 sounds better to me. -- Dave Page EnterpriseDB UK: http://www.enterprise

Re: [BUGS] plperl & sort

2008-11-04 Thread Tom Lane
"Alex Hunsaker" <[EMAIL PROTECTED]> writes: > Hrm works for me if I take out the elog from sort() Even more interesting, this variant *doesn't* work: regression=# create or replace function trustedsort() returns int as $$ my @arr = qw(5 4 3 2 1); my @sorted = sort { "$a" <=> "$b" } @arr; elog(NOT

Re: [BUGS] plperl & sort

2008-11-04 Thread Alex Hunsaker
On Tue, Nov 4, 2008 at 09:02, Jeff <[EMAIL PROTECTED]> wrote: > I've ran into this interesting problem. > It seems that while you can call sort() in a trusted plperl func you cannot > access $a & $b which effectively makes it useless. Hrm works for me if I take out the elog from sort() create or

Re: [BUGS] plperl & sort

2008-11-04 Thread Tom Lane
Jeff <[EMAIL PROTECTED]> writes: > I've ran into this interesting problem. > It seems that while you can call sort() in a trusted plperl func you > cannot access $a & $b which effectively makes it useless. > I've tested this on 8.2.11, 8.3.5, and the nov 4 snapshot on > ftp.postgresql.org > In

[BUGS] plperl & sort

2008-11-04 Thread Jeff
I've ran into this interesting problem. It seems that while you can call sort() in a trusted plperl func you cannot access $a & $b which effectively makes it useless. I've tested this on 8.2.11, 8.3.5, and the nov 4 snapshot on ftp.postgresql.org In all cases its on a mac with perl 5.8.8. I a

Re: [BUGS] BUG #4494: Memory leak in pg_regress.c

2008-11-04 Thread Alvaro Herrera
Zdenek Kotala wrote: > [EMAIL PROTECTED] napsal(a): >> In file src/test/regress/pg_regress.c:1112 >> >> It seems to me that variables "s" and "tmp" leak memory here if last_dot is >> false: > OK. It seems as a bug. tmp and s should be freed when strrchr fails. Also > there is not check when mall

[BUGS] BUG #4509: array_cat's null behaviour is inconsistent

2008-11-04 Thread Kevin Field
The following bug has been logged online: Bug reference: 4509 Logged by: Kevin Field Email address: [EMAIL PROTECTED] PostgreSQL version: 8.3.4 Operating system: Windows Server 2003 SP2 Description:array_cat's null behaviour is inconsistent Details: Section 9.2 in t

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Craig Ringer
Zahid Khan wrote: > > > I am using 8.3.1 driver ,Is this changed in any new version ? Not as far as I know. There might be problems if you were using, say, an 8.2.x driver with an 8.3 server, though. -- Craig Ringer -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make chan

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Hiroshi Saito
Hi. Zahid Khan <[EMAIL PROTECTED]> writes: In my application we are getting different results in 8.2\xA0 and 8.3 servers. if we execute the query no 3 below after creating table even on psql.As psqlODBC drives executes query no 3 below to get foreign key information.if we want to reproduce thi

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Zahid Khan
I am using 8.3.1 driver ,Is this changed in any new version ? --- On Tue, 11/4/08, Craig Ringer <[EMAIL PROTECTED]> wrote: From: Craig Ringer <[EMAIL PROTECTED]> Subject: Re: [BUGS] Behavior change of FK info query To: [EMAIL PROTECTED] Cc: pgsql-bugs@postgresql.org Date: Tuesday, November 4, 20

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Zahid Khan
I am using 8.3.1 driver ,Is this changed in any new version ? --- On Tue, 11/4/08, Craig Ringer <[EMAIL PROTECTED]> wrote: From: Craig Ringer <[EMAIL PROTECTED]> Subject: Re: [BUGS] Behavior change of FK info query To: [EMAIL PROTECTED] Cc: pgsql-bugs@postgresql.org Date: Tuesday, November 4, 20

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Craig Ringer
Zahid Khan wrote: > > Hi, > > I am getting one failures in odbc application with 8.3 server which is > related to foreign key information. Which ODBC driver version are you using? Remember that newer drivers work with older database servers, but older drivers may not work with newer database ser

Re: [BUGS] Behavior change of FK info query

2008-11-04 Thread Tom Lane
Zahid Khan <[EMAIL PROTECTED]> writes: > In my application we are getting different results in 8.2  and 8.3 servers. > if we execute the query no 3 below after creating table even on psql.As > psqlODBC drives executes query no 3 below to get foreign key information.if > we want to reproduce this

[BUGS] Behavior change of FK info query

2008-11-04 Thread Zahid Khan
Hi, I am getting one failures in odbc application with 8.3 server which is related to foreign key information. In my application we are getting different results in 8.2  and 8.3 servers. if we execute the query no 3 below after creating table even on psql.As psqlODBC drives executes query no