preprocessor bug?

Started by Michael Meskesalmost 28 years ago3 messages
#1Michael Meskes
meskes@topsystem.de

IMO this is a rather serious bug:

{
exec sql begin declare section;
long i;
exec sql end declare section;
...
{
exec sql begin declare section;
short i;
exec sql end declare section;
...
}
...
some DB access into i;

The code produced by ecpg now lists i with size 2 bytes, i.e. it still
thinks i is a short.

I believe I have found a way to work around this and disregard variable
definitions as soon as they are no longer valid.

To my big surprise though I noticed that ORACLE's proc suffers from the same
bug. I hope it's okay with you that I don't care about compatibility and fix
this. :-)

Michael

--
Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH
meskes@topsystem.de | Europark A2, Adenauerstr. 20
meskes@debian.org | 52146 Wuerselen
Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10

#2Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Michael Meskes (#1)
Re: [HACKERS] preprocessor bug?

To my big surprise though I noticed that ORACLE's proc suffers from the same
bug. I hope it's okay with you that I don't care about compatibility and fix
this. :-)

Fix it, please.

--
Bruce Momjian
maillist@candle.pha.pa.us

#3Meskes, Michael
meskes@topsystem.de
In reply to: Bruce Momjian (#2)
RE: [HACKERS] preprocessor bug?

Fixed with my lates upload, abour half an hour ago.

Michael

--
Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH
meskes@topsystem.de | Europark A2, Adenauerstr. 20
meskes@debian.org | 52146 Wuerselen
Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10

Show quoted text

-----Original Message-----
From: Bruce Momjian [SMTP:maillist@candle.pha.pa.us]
Sent: Thursday, February 12, 1998 3:27 PM
To: meskes@topsystem.de
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] preprocessor bug?

To my big surprise though I noticed that ORACLE's proc suffers from

the same

bug. I hope it's okay with you that I don't care about compatibility

and fix

this. :-)

Fix it, please.

--
Bruce Momjian
maillist@candle.pha.pa.us