Re: BUG #14754: ecpg SQL parsing error

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: zuberre(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14754: ecpg SQL parsing error
Date: 2017-08-11 13:38:37
Message-ID: 1502458717.9976.323.camel@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks for the report Richard, sorry it took me a while to find time to
debug.

> I’ve been using ecpg as part of my automated test framework to ensure
> my
> various SQL migrations have proper syntax.  I believe I have run into
> an
> error where ECPG is reporting a syntax error that does not in fact
> exist.

I guess I agree, after all ecpg should accept everything that the
server accepts, right? :)

The problem is that ecpg expects every non-empty returning clause to
end with an "into <variable>" sectio to store the data in C. This
obviously does not make sense. I have to do more tests to see if making
the into clause optional breaks other things. If you have a large base
of test cases you're welcome to try it out too, once the patch is done.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Adam, Etienne (Nokia-TECH/Issy Les Moulineaux) 2017-08-11 15:33:22 [postgresql 10 beta3] unrecognized node type: 90
Previous Message Thomas S. Chin 2017-08-11 13:28:06 Re: BUG #14776: ecpg 4.12.0 issues with macros containing line continued blocks