[HACKERS] [bug fix] ECPG: fails to recognize embedded parameters - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject [HACKERS] [bug fix] ECPG: fails to recognize embedded parameters
Date
Msg-id 0A3221C70F24FB45833433255569204D1F80AB63@G01JPEXMBYT05
Whole thread Raw
Responses Re: [HACKERS] [bug fix] ECPG: fails to recognize embedded parameters
List pgsql-hackers
Hello,

This is an actual problem that our customer hit.  In ECPG, opening a cursor fails which is declared as follows:

    EXEC SQL DECLARE cur CURSOR FOR
        SELECT oid, datname
        FROM pg_database
        WHERE datname LIKE 'post%' ESCAPE '\' AND datconnlimit = :connlimit;

sqlstate: 07001
sqlerrm.sqlerrmc: too many arguments on line 30

The cause is that next_insert() in ecpglib unconditionally skips the next character after the backslash.

Could you review and commit the attached patch?  I also attached the test program for convenience.

Regards
Takayuki Tsunakawa



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] path toward faster partition pruning
Next
From: Andrey Borodin
Date:
Subject: Re: [HACKERS] Allow GiST opcalsses without compress\decompresfunctions