POSTGRESQL bug report

From: theofilu(at)eunet(dot)at (Theofilu Andreas)
To: pgsql-bugs(at)postgresql(dot)org
Subject: POSTGRESQL bug report
Date: 1999-09-11 13:15:56
Message-ID: 199909111316.PAA17097@eunet.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

-----BEGIN PGP SIGNED MESSAGE-----

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Andreas Theofilu
Your email address : theofilu(at)eunet(dot)at

System Configuration
- ---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.7 ELF

PostgreSQL version (example: PostgreSQL-6.5.1): PostgreSQL-6.5.1

Compiler used (example: gcc 2.8.0) : egcs-2.91.66

Please enter a FULL description of your problem:
- ------------------------------------------------
There is a problem with 'ecpg'.
If you've the SQL command

EXEC SQL free <cursorname>

you can't compile the resulting c-file. 'ecpg' translates the above command
into

{ ECPGdeallocate (__LINE__, NULL, "<cursorname"); }

This is wrong, because the function ECPGdeallocate has only 2 (two!)
parameters. It should be translated into

{ ECPGdeallocate (__LINE__, "<cursorname"); }

For a fix look below.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
- ----------------------------------------------------------------------
Create a file with the SQL command

EXEC SQL free <cursorname>

Let it through the preprocessor 'ecpg' and try to compile it with the
C-Compiler.

If you know how this problem might be fixed, list the solution below:
- ---------------------------------------------------------------------
This can easily be fixed. Change line 988 of file
'postgresql-6.5.1/src/interfaces/ecpg/preproc/preproc.y' to

fprintf (yyout, "{ ECPGdeallocate (__LINE__, \"%s\");", $1);

This fixed the bug here :-).

- --
Theofilu Andreas
http://members.eunet.at/theofilu

-------------------------------------------------
Enjoy the science of Linux!
Genieße die Wissenschaft von Linux!
-------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBN9pWE2j/BcrYxhjVAQHS6AP/RdD3ThaMqY0BF8F29At8gPxaf1TArMWa
+Wqkw9XeAcsZq9p6814oeCdKpycDxyN+c8hIZ1UyjLAFLmL3n/hQPQ6DiOMmj4bY
9SNeFtifgDiAEerGKH2xDFMlRG/v92y0Mt/0DeWZPGCA8idP9bt6R+99gSyxLY8P
aPkIrOKWo+I=
=RhpO
-----END PGP SIGNATURE-----

Browse pgsql-bugs by date

  From Date Subject
Next Message Theofilu Andreas 1999-09-11 13:38:43 Strange problem with ecpg
Previous Message Alois Maier 1999-09-11 08:32:48 Re: [BUGS] Set Transaction Isolation level bug