473,465 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2593
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Slava Gorski | last post by:
Hi all, It seems that get diagnostics is not supported by ecpg in postgresql 7.3, I always get the following error when trying to use it: ERROR: parse error at or near "diagnostics" For...
2
by: Thierry Missimilly | last post by:
Hi, I'm not sure it's a bug or it's normal, so i don't send it to pgsq-bugs. Well, i have written pgbench in PRO*C to have a common pgbench.pgc source for Postgres and Oracle. However, there...
4
by: Thierry Missimilly | last post by:
Hi, This is the wrong mailing list but I don't sent it to pgsql-bugs with success. ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to...
3
by: Lynn.Tilby | last post by:
The following program produces the output below... It is built with: vrfy_prob: vrfy_prob.cpg /usr/local/pgsql/bin/ecpg -I/usr/local/pgsql/include -o vrfy_prob.c vrfy_prob.cpg gcc -g${DEBUG}...
4
by: Carmen Gloria Sepulveda Dedes | last post by:
Hello. I have a 2 files: test.h and test.pgc. In test.h, I defined: typedef struct { long curid; char curnombre; char curfecha;
3
by: Lynn.Tilby | last post by:
I am running 7.1.3... The docs for ecpg in 7.1.3 don't have the -e option in them! YET, ecpg -e WORKS!!! for solving the vacuum problem. Just WHAT does the -e option in ecpg do???? Thanks...
1
by: George Gensure | last post by:
I wanted to ask this on here before going any further. I've got functions that return rowsets, which from the psql shell require me to write selects with AS TBL( ... ) to define the return types....
0
by: Christian Rank | last post by:
Today I ran into problems when combining a C program with SQL statements with the ECPG interface of PostgreSQL: According to the documentation, it should be possible with EXEC SQL WHENEVER NOT...
1
by: Richard Connamacher | last post by:
I was looking through the docs, ECPG looks like a great tool for developing client applications. Anyone know if it's possible to set it up for use with Objective C in XCode on Mac OS X? XCode...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.