Closed yonatan-blue closed 8 years ago
Can you provide a sql file that reproduces the problem?
@markdrago
following is the string I wanted to check, but, I tried reproducing and it only reproduce on python 3.4.3
and not on python 3.5.2
.
CREATE OR REPLACE FUNCTION one_more_function_name(var_name TEXT) RETURNS INTEGER
AS $$
INSERT INTO another_function (var_name)
VALUES (var_name)
RETURNING id;
$$
LANGUAGE SQL;
CREATE OR REPLACE FUNCTION function_name(var_name TEXT) RETURNS INTEGER
AS $$
SELECT function_name(var_name)
$$
LANGUAGE SQL;
I tried reproducing this and, as you said, it works in python 3.5.2. It also works with python 2.7.12. To be honest, I'm tempted to not make any changes. While I can't back it up, I think the munmap_chunk error is more indicative of a problem in ecpg than in pgsanity. I'd rather not work around it - especially if it works in the latest versions of python2 and python3.
Is it possible that your two tests are using different versions of ecpg as well? Was the python 3.4.3 test and the 3.5.2 test executed on the same machine with the same ecpg?
@markdrago yes, you are right: I only got the error with:
ecpg (PostgreSQL 9.6.1) 4.12.0 # with python 3.4.3
and with:
ecpg (PostgreSQL 9.5.5) 4.11.0 # with python 3.5.2
I did not get the error.
ecpg
that is supposedly broken :)any how I'm good...
@markdrago thanks for your replay
tldr; check your ecpg
version
I'm running the same version of ecpg that gave you a problem:
ecpg (PostgreSQL 9.6.1) 4.12.0
I think we'll just hold tight for now and see if anyone else is able to reproduce.
on running:
with a multi-line sql command I get:
*** Error in `ecpg': munmap_chunk(): invalid pointer: ***
I have found a workaround:
meaning I remove all empty lines. I tried adding this snippet in:
pgsanity.pgsanity.ecpg.check_syntax
but it broke the tests:how can I fix this?