Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecc4b13

Browse files
committed
Remove duplicate include
Reported-by: Ashutosh Sharma <ashu.coek88@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/CAE9k0PkORqHHGKY54-sFyDpP90yAf%2B05Auc4fs9EAn4J%2BuBeUQ%40mail.gmail.com
1 parent16dfe25 commitecc4b13

File tree

3 files changed

+57
-59
lines changed

3 files changed

+57
-59
lines changed

‎src/interfaces/ecpg/test/expected/preproc-define.c

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#line 1 "define.pgc"
1010
#include<stdlib.h>
1111
#include<string.h>
12-
#include<stdlib.h>
1312
#include<stdio.h>
1413

1514

@@ -20,18 +19,18 @@
2019

2120

2221

23-
#line6 "define.pgc"
22+
#line5 "define.pgc"
2423

2524

2625
/* exec sql whenever sqlerror sqlprint ; */
27-
#line8 "define.pgc"
26+
#line7 "define.pgc"
2827

2928

3029

3130

3231

3332
/* exec sql type intarray is int [ 6 ] */
34-
#line13 "define.pgc"
33+
#line12 "define.pgc"
3534

3635
typedefintintarray[6];
3736

@@ -43,7 +42,7 @@ main(void)
4342

4443
typedefcharstring [8 ];
4544

46-
#line22 "define.pgc"
45+
#line21 "define.pgc"
4746

4847

4948

@@ -65,65 +64,65 @@ main(void)
6564

6665

6766

68-
#line23 "define.pgc"
67+
#line22 "define.pgc"
6968
intarrayamount ;
7069

71-
#line24 "define.pgc"
70+
#line23 "define.pgc"
7271
charname [6 ] [8 ] ;
7372

74-
#line37 "define.pgc"
73+
#line36 "define.pgc"
7574
charletter [6 ] [1 ] ;
7675

7776
#if0
7877

79-
#line39 "define.pgc"
78+
#line38 "define.pgc"
8079
intnot_used ;
8180

8281
#endif
8382
/* exec sql end declare section */
84-
#line46 "define.pgc"
83+
#line45 "define.pgc"
8584

8685
inti,j;
8786

8887
ECPGdebug(1,stderr);
8988

9089
{ECPGconnect(__LINE__,0,"ecpg1_regression" ,NULL,NULL ,NULL,0);
91-
#line51 "define.pgc"
90+
#line50 "define.pgc"
9291

9392
if (sqlca.sqlcode<0)sqlprint();}
94-
#line51 "define.pgc"
93+
#line50 "define.pgc"
9594

9695

9796
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )",ECPGt_EOIT,ECPGt_EORT);
98-
#line53 "define.pgc"
97+
#line52 "define.pgc"
9998

10099
if (sqlca.sqlcode<0)sqlprint();}
101-
#line53 "define.pgc"
100+
#line52 "define.pgc"
102101

103102
{ECPGtrans(__LINE__,NULL,"commit");
104-
#line54 "define.pgc"
103+
#line53 "define.pgc"
105104

106105
if (sqlca.sqlcode<0)sqlprint();}
107-
#line54 "define.pgc"
106+
#line53 "define.pgc"
108107

109108

110109
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' )",ECPGt_EOIT,ECPGt_EORT);
111-
#line56 "define.pgc"
110+
#line55 "define.pgc"
112111

113112
if (sqlca.sqlcode<0)sqlprint();}
114-
#line56 "define.pgc"
113+
#line55 "define.pgc"
115114

116115
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' )",ECPGt_EOIT,ECPGt_EORT);
117-
#line57 "define.pgc"
116+
#line56 "define.pgc"
118117

119118
if (sqlca.sqlcode<0)sqlprint();}
120-
#line57 "define.pgc"
119+
#line56 "define.pgc"
121120

122121
{ECPGtrans(__LINE__,NULL,"commit");
123-
#line58 "define.pgc"
122+
#line57 "define.pgc"
124123

125124
if (sqlca.sqlcode<0)sqlprint();}
126-
#line58 "define.pgc"
125+
#line57 "define.pgc"
127126

128127

129128
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"select * from test",ECPGt_EOIT,
@@ -133,10 +132,10 @@ if (sqlca.sqlcode < 0) sqlprint();}
133132
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
134133
ECPGt_char,(letter),(long)1,(long)6,(1)*sizeof(char),
135134
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);
136-
#line60 "define.pgc"
135+
#line59 "define.pgc"
137136

138137
if (sqlca.sqlcode<0)sqlprint();}
139-
#line60 "define.pgc"
138+
#line59 "define.pgc"
140139

141140

142141
for (i=0,j=sqlca.sqlerrd[2];i<j;i++)
@@ -146,39 +145,39 @@ if (sqlca.sqlcode < 0) sqlprint();}
146145

147146

148147

149-
#line65 "define.pgc"
148+
#line64 "define.pgc"
150149
stringn ;
151150

152-
#line66 "define.pgc"
151+
#line65 "define.pgc"
153152
charl=letter [i ] [0 ] ;
154153

155-
#line67 "define.pgc"
154+
#line66 "define.pgc"
156155
inta=amount [i ] ;
157156
/* exec sql end declare section */
158-
#line68 "define.pgc"
157+
#line67 "define.pgc"
159158

160159

161160
strncpy(n,name[i],8);
162161
printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n",i,n,i,a,i,l);
163162
}
164163

165164
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"drop table test",ECPGt_EOIT,ECPGt_EORT);
166-
#line74 "define.pgc"
165+
#line73 "define.pgc"
167166

168167
if (sqlca.sqlcode<0)sqlprint();}
169-
#line74 "define.pgc"
168+
#line73 "define.pgc"
170169

171170
{ECPGtrans(__LINE__,NULL,"commit");
172-
#line75 "define.pgc"
171+
#line74 "define.pgc"
173172

174173
if (sqlca.sqlcode<0)sqlprint();}
175-
#line75 "define.pgc"
174+
#line74 "define.pgc"
176175

177176
{ECPGdisconnect(__LINE__,"CURRENT");
178-
#line76 "define.pgc"
177+
#line75 "define.pgc"
179178

180179
if (sqlca.sqlcode<0)sqlprint();}
181-
#line76 "define.pgc"
180+
#line75 "define.pgc"
182181

183182

184183
return0;

‎src/interfaces/ecpg/test/expected/preproc-define.stderr

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,53 @@
22
[NO_PID]: sqlca: code: 0, state: 00000
33
[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
44
[NO_PID]: sqlca: code: 0, state: 00000
5-
[NO_PID]: ecpg_execute on line53: query: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ); with 0 parameter(s) on connection ecpg1_regression
5+
[NO_PID]: ecpg_execute on line52: query: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ); with 0 parameter(s) on connection ecpg1_regression
66
[NO_PID]: sqlca: code: 0, state: 00000
7-
[NO_PID]: ecpg_execute on line53: using PQexec
7+
[NO_PID]: ecpg_execute on line52: using PQexec
88
[NO_PID]: sqlca: code: 0, state: 00000
9-
[NO_PID]: ecpg_process_output on line53: OK: CREATE TABLE
9+
[NO_PID]: ecpg_process_output on line52: OK: CREATE TABLE
1010
[NO_PID]: sqlca: code: 0, state: 00000
11-
[NO_PID]: ECPGtrans on line54: action "commit"; connection "ecpg1_regression"
11+
[NO_PID]: ECPGtrans on line53: action "commit"; connection "ecpg1_regression"
1212
[NO_PID]: sqlca: code: 0, state: 00000
13-
[NO_PID]: ecpg_execute on line56: query: insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' ); with 0 parameter(s) on connection ecpg1_regression
13+
[NO_PID]: ecpg_execute on line55: query: insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' ); with 0 parameter(s) on connection ecpg1_regression
1414
[NO_PID]: sqlca: code: 0, state: 00000
15-
[NO_PID]: ecpg_execute on line56: using PQexec
15+
[NO_PID]: ecpg_execute on line55: using PQexec
1616
[NO_PID]: sqlca: code: 0, state: 00000
17-
[NO_PID]: ecpg_process_output on line56: OK: INSERT 0 1
17+
[NO_PID]: ecpg_process_output on line55: OK: INSERT 0 1
1818
[NO_PID]: sqlca: code: 0, state: 00000
19-
[NO_PID]: ecpg_execute on line57: query: insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' ); with 0 parameter(s) on connection ecpg1_regression
19+
[NO_PID]: ecpg_execute on line56: query: insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' ); with 0 parameter(s) on connection ecpg1_regression
2020
[NO_PID]: sqlca: code: 0, state: 00000
21-
[NO_PID]: ecpg_execute on line57: using PQexec
21+
[NO_PID]: ecpg_execute on line56: using PQexec
2222
[NO_PID]: sqlca: code: 0, state: 00000
23-
[NO_PID]: ecpg_process_output on line57: OK: INSERT 0 1
23+
[NO_PID]: ecpg_process_output on line56: OK: INSERT 0 1
2424
[NO_PID]: sqlca: code: 0, state: 00000
25-
[NO_PID]: ECPGtrans on line58: action "commit"; connection "ecpg1_regression"
25+
[NO_PID]: ECPGtrans on line57: action "commit"; connection "ecpg1_regression"
2626
[NO_PID]: sqlca: code: 0, state: 00000
27-
[NO_PID]: ecpg_execute on line60: query: select * from test; with 0 parameter(s) on connection ecpg1_regression
27+
[NO_PID]: ecpg_execute on line59: query: select * from test; with 0 parameter(s) on connection ecpg1_regression
2828
[NO_PID]: sqlca: code: 0, state: 00000
29-
[NO_PID]: ecpg_execute on line60: using PQexec
29+
[NO_PID]: ecpg_execute on line59: using PQexec
3030
[NO_PID]: sqlca: code: 0, state: 00000
31-
[NO_PID]: ecpg_process_output on line60: correctly got 2 tuples with 3 fields
31+
[NO_PID]: ecpg_process_output on line59: correctly got 2 tuples with 3 fields
3232
[NO_PID]: sqlca: code: 0, state: 00000
33-
[NO_PID]: ecpg_get_data on line60: RESULT: false offset: -1; array: no
33+
[NO_PID]: ecpg_get_data on line59: RESULT: false offset: -1; array: no
3434
[NO_PID]: sqlca: code: 0, state: 00000
35-
[NO_PID]: ecpg_get_data on line60: RESULT: true offset: -1; array: no
35+
[NO_PID]: ecpg_get_data on line59: RESULT: true offset: -1; array: no
3636
[NO_PID]: sqlca: code: 0, state: 00000
37-
[NO_PID]: ecpg_get_data on line60: RESULT: 1 offset: -1; array: no
37+
[NO_PID]: ecpg_get_data on line59: RESULT: 1 offset: -1; array: no
3838
[NO_PID]: sqlca: code: 0, state: 00000
39-
[NO_PID]: ecpg_get_data on line60: RESULT: 2 offset: -1; array: no
39+
[NO_PID]: ecpg_get_data on line59: RESULT: 2 offset: -1; array: no
4040
[NO_PID]: sqlca: code: 0, state: 00000
41-
[NO_PID]: ecpg_get_data on line60: RESULT: f offset: -1; array: no
41+
[NO_PID]: ecpg_get_data on line59: RESULT: f offset: -1; array: no
4242
[NO_PID]: sqlca: code: 0, state: 00000
43-
[NO_PID]: ecpg_get_data on line60: RESULT: t offset: -1; array: no
43+
[NO_PID]: ecpg_get_data on line59: RESULT: t offset: -1; array: no
4444
[NO_PID]: sqlca: code: 0, state: 00000
45-
[NO_PID]: ecpg_execute on line74: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
45+
[NO_PID]: ecpg_execute on line73: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
4646
[NO_PID]: sqlca: code: 0, state: 00000
47-
[NO_PID]: ecpg_execute on line74: using PQexec
47+
[NO_PID]: ecpg_execute on line73: using PQexec
4848
[NO_PID]: sqlca: code: 0, state: 00000
49-
[NO_PID]: ecpg_process_output on line74: OK: DROP TABLE
49+
[NO_PID]: ecpg_process_output on line73: OK: DROP TABLE
5050
[NO_PID]: sqlca: code: 0, state: 00000
51-
[NO_PID]: ECPGtrans on line75: action "commit"; connection "ecpg1_regression"
51+
[NO_PID]: ECPGtrans on line74: action "commit"; connection "ecpg1_regression"
5252
[NO_PID]: sqlca: code: 0, state: 00000
5353
[NO_PID]: ecpg_finish: connection ecpg1_regression closed
5454
[NO_PID]: sqlca: code: 0, state: 00000

‎src/interfaces/ecpg/test/preproc/define.pgc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <stdlib.h>
22
#include <string.h>
3-
#include <stdlib.h>
43
#include <stdio.h>
54

65
exec sql include ../regression;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp