Thank you Patrick and Graham.
On Dec 21, 3:05 pm, pbreit wrote:
> Graham sent me a patched NewRelic agent (version 1.0.6.176) which appears
> to be working fine.
Graham sent me a patched NewRelic agent (version 1.0.6.176) which appears
to be working fine.
Thanks Graham,
we may eventually change this. One of the reason for rewriting the DAL
was to add parametric queries. It just ever happened because there was
not sufficient motivation, as users do not see this.
Massimo
On Dec 15, 6:44 pm, Graham Dumpleton
wrote:
> I am making a change on New Reli
I tried the fix without New Relic and it worked OK.
Will try out your patched agent tomorrow.
It does seem like Web2py would be well off sending in parameterized queries.
I am making a change on New Relic side. You can't do what you are doing as
that then will cause wrong thing to happen for when New Relic not used.
So am changing things to accommodate for what psycopg2 interprets as
default argument.
The issue hasn't come up before because Web2Py is the only fr
I found a fix but I am not qualified to determine if it should go in as a
patch.
I basically added a % on each side. I think %% distills down to % without
triggering a substitution.
http://code.google.com/p/web2py/source/browse/gluon/dal.py#1924
From:
key = '%|'+str(second).replace('|','||').r
Thanks for investigating. Is it something that is fixable on NewRelic's
end? Or would Web2py need to change how it submits the query?
>From my brief research, it does seem like psycopg expects queries to be
parameterized (ie, using string substitution). However my query works fine
when not wrap
Okay, have an answer.
Looks like we may be falling into a bit of undefined territory within
the DBAPI2 specification that I can see and different DBAPI2 modules
behave differently.
Some will take parameters as evaluating False to mean no parameters
and so not trigger doing any variable substituti
Are you perhaps introspecting the type of the cursor object in some
way and changing behaviour based on that? We wrap the cursor object
returned by DBAPI2 module and so you wouldn't see original psycopg2
cursor type.
Graham
On Dec 16, 10:02 am, Graham Dumpleton
wrote:
> On Dec 16, 7:13 am, Massi
On Dec 16, 7:13 am, Massimo Di Pierro
wrote:
> I disagree. this
>
> SELECT * FROM table where field ILIKE '%|featured|%';
>
> is valid SQL. % does not need to be escaped in SQL and, in fact, it is
> used for pattern patching:
>
> http://www.postgresql.org/docs/7.4/static/functions-matching.html
Although it does seem like psycopg prefers parameterization.
I tend to agree. Even if it's not "best practice" (probably debatable), it
should still be supported by New Relic).
I disagree. this
SELECT * FROM table where field ILIKE '%|featured|%';
is valid SQL. % does not need to be escaped in SQL and, in fact, it is
used for pattern patching:
http://www.postgresql.org/docs/7.4/static/functions-matching.html
Perhaps new-relic may have a bug.
On Dec 14, 5:30 pm, pbrei
Bump
14 matches
Mail list logo