ECPG oracle mode test program patch

Started by Shinoda, Noriyoshialmost 8 years ago2 messages
#1Shinoda, Noriyoshi
noriyoshi.shinoda@hpe.com
1 attachment(s)

Hi, Hackers

The attached small patch is a modification to the test program of the function recently added to ECPG.
[Add Oracle like handling of char arrays.]
https://git.postgresql.org/pg/commitdiff/3b7ab4380440d7b14ee390fabf39f6d87d7491e2

When the char_array program is executed, the following error occurs in the closed part of the CURSOR.

[NO_PID]: ecpg_check_PQresult on line 54: bad response - ERROR: cursor "cstr" does not exist
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlstate 34000 (sqlcode -400): cursor "cstr" does not exist on line 54

The attached patch corrects the cursor name.

Regards,

Noriyoshi Shinoda

Attachments:

char_array.patchapplication/octet-stream; name=char_array.patchDownload
diff --git a/src/interfaces/ecpg/test/compat_oracle/char_array.pgc b/src/interfaces/ecpg/test/compat_oracle/char_array.pgc
index 5b5d0bb..8c33b18 100644
--- a/src/interfaces/ecpg/test/compat_oracle/char_array.pgc
+++ b/src/interfaces/ecpg/test/compat_oracle/char_array.pgc
@@ -51,7 +51,7 @@ int main() {
     printf("\"%s\": \"%s\"  %d\n", bigstr, shortstr, shstr_ind);
   }
 
-  EXEC SQL close cstr;
+  EXEC SQL CLOSE C; 
   EXEC SQL DROP TABLE strdbase;
 
   printf("\nGOOD-BYE!!\n\n");
#2Michael Meskes
meskes@postgresql.org
In reply to: Shinoda, Noriyoshi (#1)
Re: ECPG oracle mode test program patch

The attached patch corrects the cursor name.

Fixed, thanks for the patch.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL