mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Revert "Add DECLARE STATEMENT support to ECPG."
This reverts commit bd7c95f0c1
,
along with assorted follow-on fixes. There are some questions
about the definition and implementation of that statement, and
we don't have time to resolve them before v13 release. Rather
than ship the feature and then have backwards-compatibility
concerns constraining any redesign, let's remove it for now
and try again later.
Discussion: https://postgr.es/m/TY2PR01MB2443EC8286995378AEB7D9F8F5B10@TY2PR01MB2443.jpnprd01.prod.outlook.com
This commit is contained in:
@ -140,7 +140,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 50 "execute.pgc"
|
||||
|
||||
|
||||
{ ECPGopen("CUR", "f", __LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR cursor for $1",
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR cursor for $1",
|
||||
ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 52 "execute.pgc"
|
||||
@ -148,7 +148,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 52 "execute.pgc"
|
||||
|
||||
{ ECPGfetch("CUR", __LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT,
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT,
|
||||
ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
|
||||
@ -180,7 +180,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
|
||||
}
|
||||
|
||||
{ ECPGclose("CUR", __LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 66 "execute.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
@ -205,7 +205,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 72 "execute.pgc"
|
||||
|
||||
|
||||
{ ECPGopen("CUR2", "f", __LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR2 cursor for $1",
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR2 cursor for $1",
|
||||
ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_const,"1",(long)1,(long)1,strlen("1"),
|
||||
@ -215,7 +215,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
#line 74 "execute.pgc"
|
||||
|
||||
{ ECPGfetch("CUR2", __LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in CUR2", ECPGt_EOIT,
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in CUR2", ECPGt_EOIT,
|
||||
ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
|
||||
@ -247,7 +247,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
||||
printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
|
||||
}
|
||||
|
||||
{ ECPGclose("CUR2", __LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR2", ECPGt_EOIT, ECPGt_EORT);
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR2", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 88 "execute.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) sqlprint();}
|
||||
|
Reference in New Issue
Block a user