By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

Problem with ecpg

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
> 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

P: n/a
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.