471,092 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Problem with ecpg

Hello.

I have a problem with ecpg precompiler.

In a code like:

****
main()
{
.... some calls to EXEC SQL
.... printf(" ... % ... \n, var_x);
....
}
****

.... we omited a " at the printf statement (syntax error).

To compile, we do"ecpg code.pgc" and the standart output prints:
.....
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
.....
in a loop (stop with ctrl-d).

When we compile with Workshop, this output go to a file in the /tmp
directory (a very big file).

The questions are:
It's a bug of ecpg o it's normal?
How can I resolve this?

Thanks.

CG
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #1
3 2467
On Fri, Oct 31, 2003 at 10:26:28AM -0300, Carmen Gloria Sepulveda Dedes wrote:
To compile, we do"ecpg code.pgc" and the standart output prints:
....
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
prueba.pgc:19: ERROR: Unterminated quoted identifier
....


Yes, it doesn't make sense to try to keep on parsing when finding an EOF
inside a string. :-)

I just fixed this in CVS, Version 3.0.0 coming with pgsql 7.4 will no
longer run this endless loop.

Thanks for reporting this bug.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: me****@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2
> Yes, it doesn't make sense to try to keep on parsing when finding an EOF
inside a string. :-)

I just fixed this in CVS, Version 3.0.0 coming with pgsql 7.4 will no
longer run this endless loop.


I have pgsql 7.3.4 and ecpg 2.10.0

Does exists a patch for this version?

Thanks.

CG


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #3
On Fri, Oct 31, 2003 at 11:20:27AM -0300, Carmen Gloria Sepulveda Dedes wrote:
I have pgsql 7.3.4 and ecpg 2.10.0

Does exists a patch for this version?


No, but it is rather simple. Just search for "Unterminated" in
preproc/pgc.l and you'll find some mmerror() calls. In these calls just
replace the ET_ERROR with ET_FATAL. That's it.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: me****@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Slava Gorski | last post: by
2 posts views Thread by Thierry Missimilly | last post: by
4 posts views Thread by Thierry Missimilly | last post: by
3 posts views Thread by Lynn.Tilby | last post: by
4 posts views Thread by Carmen Gloria Sepulveda Dedes | last post: by
3 posts views Thread by Lynn.Tilby | last post: by
1 post views Thread by George Gensure | last post: by
reply views Thread by Christian Rank | last post: by
1 post views Thread by Richard Connamacher | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.