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

Commit84844ba

Browse files
author
Michael Meskes
committed
More SoC stuff
1 parentfb9e56e commit84844ba

18 files changed

+308
-240
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,5 +2103,9 @@ Fr 18. Aug 17:32:54 CEST 2006
21032103
- Synced parser and keyword list.
21042104
- Fixed parsing of CONNECT statement so it accepts a C string again.
21052105
- Fixed a buffer overrun that was masked on Linux systems.
2106+
2107+
Sa 19. Aug 14:11:32 CEST 2006
2108+
2109+
- More SoC stuff.
21062110
- Set ecpg library version to 5.2.
21072111
- Set ecpg version to 4.2.1.

‎src/interfaces/ecpg/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ clean distclean maintainer-clean:
1818
-$(MAKE) -C preproc$@
1919
-$(MAKE) -Ctest clean
2020

21-
checkchecktcp: all
21+
checkchecktcpinstallcheck: all
2222
$(MAKE) -Ctest$@

‎src/interfaces/ecpg/test/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.57 2006/08/08 19:43:11 tgl Exp $
1+
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.58 2006/08/19 13:42:40 meskes Exp $
22

33
subdir = src/interfaces/ecpg/test
44
top_builddir = ../../../..
@@ -61,3 +61,5 @@ check: all pg_regress.inc.sh
6161
checktcp: all pg_regress.inc.sh
6262
sh ./pg_regress.sh --dbname=regress1 --debug --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql$(NOLOCALE) --listen-on-tcp
6363

64+
installcheck: all pg_regress.inc.sh
65+
sh ./pg_regress.sh --dbname=regress1 --debug --top-builddir=$(top_builddir) --load-language=plpgsql$(NOLOCALE)

‎src/interfaces/ecpg/test/compat_informix/test_informix2.pgc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ int main(void)
6363
EXEC SQL connect to :dbname;
6464
sql_check("main", "connect", 0);
6565

66+
EXEC SQL SET DateStyle TO 'DMY';
67+
6668
EXEC SQL create table history (customerid integer, timestamp timestamp without time zone, action_taken char(5), narrative varchar(100));
6769
sql_check("main", "create", 0);
6870

‎src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -179,29 +179,36 @@ if (sqlca.sqlcode < 0) sqlprint();}
179179

180180
sql_check("main","connect",0);
181181

182-
{ECPGdo(__LINE__,1,1,NULL,"create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) )",ECPGt_EOIT,ECPGt_EORT);
182+
{ECPGdo(__LINE__,1,1,NULL,"set DateStyle to 'DMY'",ECPGt_EOIT,ECPGt_EORT);
183183
#line 66 "test_informix2.pgc"
184184

185185
if (sqlca.sqlcode<0)sqlprint();}
186186
#line 66 "test_informix2.pgc"
187187

188+
189+
{ECPGdo(__LINE__,1,1,NULL,"create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) ",ECPGt_EOIT,ECPGt_EORT);
190+
#line 68 "test_informix2.pgc"
191+
192+
if (sqlca.sqlcode<0)sqlprint();}
193+
#line 68 "test_informix2.pgc"
194+
188195
sql_check("main","create",0);
189196

190197
{ECPGdo(__LINE__,1,1,NULL,"insert into history ( customerid , timestamp , action_taken , narrative ) values( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' )",ECPGt_EOIT,ECPGt_EORT);
191-
#line71 "test_informix2.pgc"
198+
#line73 "test_informix2.pgc"
192199

193200
if (sqlca.sqlcode<0)sqlprint();}
194-
#line71 "test_informix2.pgc"
201+
#line73 "test_informix2.pgc"
195202

196203
sql_check("main","insert",0);
197204

198205
{ECPGdo(__LINE__,1,1,NULL,"select max ( timestamp ) from history ",ECPGt_EOIT,
199206
ECPGt_timestamp,&(maxd),(long)1,(long)1,sizeof(timestamp),
200207
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);
201-
#line76 "test_informix2.pgc"
208+
#line78 "test_informix2.pgc"
202209

203210
if (sqlca.sqlcode<0)sqlprint();}
204-
#line76 "test_informix2.pgc"
211+
#line78 "test_informix2.pgc"
205212

206213
sql_check("main","select max",100);
207214

@@ -212,10 +219,10 @@ if (sqlca.sqlcode < 0) sqlprint();}
212219
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
213220
ECPGt_timestamp,&(d),(long)1,(long)1,sizeof(timestamp),
214221
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);
215-
#line83 "test_informix2.pgc"
222+
#line85 "test_informix2.pgc"
216223

217224
if (sqlca.sqlcode<0)sqlprint();}
218-
#line83 "test_informix2.pgc"
225+
#line85 "test_informix2.pgc"
219226

220227
sql_check("main","select",0);
221228

@@ -231,40 +238,40 @@ if (sqlca.sqlcode < 0) sqlprint();}
231238
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
232239
ECPGt_timestamp,&(e),(long)1,(long)1,sizeof(timestamp),
233240
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EOIT,ECPGt_EORT);
234-
#line95 "test_informix2.pgc"
241+
#line97 "test_informix2.pgc"
235242

236243
if (sqlca.sqlcode<0)sqlprint();}
237-
#line95 "test_informix2.pgc"
244+
#line97 "test_informix2.pgc"
238245

239246
sql_check("main","update",0);
240247

241248
{ECPGtrans(__LINE__,NULL,"commit");
242-
#line98 "test_informix2.pgc"
249+
#line100 "test_informix2.pgc"
243250

244251
if (sqlca.sqlcode<0)sqlprint();}
245-
#line98 "test_informix2.pgc"
252+
#line100 "test_informix2.pgc"
246253

247254

248255
{ECPGdo(__LINE__,1,1,NULL,"drop table history ",ECPGt_EOIT,ECPGt_EORT);
249-
#line100 "test_informix2.pgc"
256+
#line102 "test_informix2.pgc"
250257

251258
if (sqlca.sqlcode<0)sqlprint();}
252-
#line100 "test_informix2.pgc"
259+
#line102 "test_informix2.pgc"
253260

254261
sql_check("main","drop",0);
255262

256263
{ECPGtrans(__LINE__,NULL,"commit");
257-
#line103 "test_informix2.pgc"
264+
#line105 "test_informix2.pgc"
258265

259266
if (sqlca.sqlcode<0)sqlprint();}
260-
#line103 "test_informix2.pgc"
267+
#line105 "test_informix2.pgc"
261268

262269

263270
{ECPGdisconnect(__LINE__,"CURRENT");
264-
#line105 "test_informix2.pgc"
271+
#line107 "test_informix2.pgc"
265272

266273
if (sqlca.sqlcode<0)sqlprint();}
267-
#line105 "test_informix2.pgc"
274+
#line107 "test_informix2.pgc"
268275

269276
sql_check("main","disconnect",0);
270277

‎src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,43 @@
22
[NO_PID]: sqlca: code: 0, state: 00000
33
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
44
[NO_PID]: sqlca: code: 0, state: 00000
5-
[NO_PID]: ECPGexecute line 66: QUERY:create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) on connection regress1
5+
[NO_PID]: ECPGexecute line 66: QUERY:set DateStyle to 'DMY' on connection regress1
66
[NO_PID]: sqlca: code: 0, state: 00000
7-
[NO_PID]: ECPGexecute line 66 Ok:CREATE TABLE
7+
[NO_PID]: ECPGexecute line 66 Ok:SET
88
[NO_PID]: sqlca: code: 0, state: 00000
9-
[NO_PID]: ECPGexecute line69: QUERY:insert intohistory ( customerid, timestamp, action_taken , narrative )values( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ) on connection regress1
9+
[NO_PID]: ECPGexecute line68: QUERY:create tablehistory ( customeridinteger, timestamptimestamp without time zone, action_takenchar ( 5 ) , narrative varchar ( 100 ) ) on connection regress1
1010
[NO_PID]: sqlca: code: 0, state: 00000
11-
[NO_PID]: ECPGexecute line69 Ok:INSERT 0 1
11+
[NO_PID]: ECPGexecute line68 Ok:CREATE TABLE
1212
[NO_PID]: sqlca: code: 0, state: 00000
13-
[NO_PID]: ECPGexecute line74: QUERY:select max ( timestamp) from history on connection regress1
13+
[NO_PID]: ECPGexecute line71: QUERY:insert into history (customerid ,timestamp , action_taken , narrative ) values( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ) on connection regress1
1414
[NO_PID]: sqlca: code: 0, state: 00000
15-
[NO_PID]: ECPGexecute line74: Correctly got 1 tuples with 1 fields
15+
[NO_PID]: ECPGexecute line71 Ok: INSERT 0 1
1616
[NO_PID]: sqlca: code: 0, state: 00000
17-
[NO_PID]:ECPGget_data line74: RESULT: Wed May 07 13:28:34 2003 offset: -1 array: Yes
17+
[NO_PID]:ECPGexecute line76: QUERY: select max ( timestamp ) from history on connection regress1
1818
[NO_PID]: sqlca: code: 0, state: 00000
19-
[NO_PID]: ECPGexecute line79: QUERY: select customerid , timestamp from history where timestamp = timestamp '2003-05-07 13:28:34' limit 1 on connection regress1
19+
[NO_PID]: ECPGexecute line76: Correctly got 1 tuples with 1 fields
2020
[NO_PID]: sqlca: code: 0, state: 00000
21-
[NO_PID]:ECPGexecute line79: Correctly got 1 tuples with 2 fields
21+
[NO_PID]:ECPGget_data line76: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes
2222
[NO_PID]: sqlca: code: 0, state: 00000
23-
[NO_PID]:ECPGget_data line79: RESULT: 1 offset: -1 array: Yes
23+
[NO_PID]:ECPGexecute line81: QUERY: select customerid , timestamp from history where timestamp = timestamp '2003-05-07 13:28:34' limit 1 on connection regress1
2424
[NO_PID]: sqlca: code: 0, state: 00000
25-
[NO_PID]:ECPGget_data line79: RESULT: Wed May 07 13:28:34 2003 offset: -1 array: Yes
25+
[NO_PID]:ECPGexecute line81: Correctly got 1 tuples with 2 fields
2626
[NO_PID]: sqlca: code: 0, state: 00000
27-
[NO_PID]:ECPGexecute line93: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values( 2 , timestamp '2003-05-08 15:53:39' , 'test' , 'test' ) on connection regress1
27+
[NO_PID]:ECPGget_data line81: RESULT: 1 offset: -1 array: Yes
2828
[NO_PID]: sqlca: code: 0, state: 00000
29-
[NO_PID]:ECPGexecute line93 Ok: INSERT 0 1
29+
[NO_PID]:ECPGget_data line81: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes
3030
[NO_PID]: sqlca: code: 0, state: 00000
31-
[NO_PID]:ECPGtrans line98 action = commit connection = regress1
31+
[NO_PID]:ECPGexecute line95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values( 2 , timestamp '2003-05-08 15:53:39' , 'test' , 'test' ) on connection regress1
3232
[NO_PID]: sqlca: code: 0, state: 00000
33-
[NO_PID]: ECPGexecute line100: QUERY: drop table history on connection regress1
33+
[NO_PID]: ECPGexecute line95 Ok: INSERT 0 1
3434
[NO_PID]: sqlca: code: 0, state: 00000
35-
[NO_PID]:ECPGexecute line 100Ok: DROP TABLE
35+
[NO_PID]:ECPGtrans line 100action = commit connection = regress1
3636
[NO_PID]: sqlca: code: 0, state: 00000
37-
[NO_PID]: ECPGtrans line 103 action = commit connection = regress1
37+
[NO_PID]: ECPGexecute line 102: QUERY: drop table history on connection regress1
38+
[NO_PID]: sqlca: code: 0, state: 00000
39+
[NO_PID]: ECPGexecute line 102 Ok: DROP TABLE
40+
[NO_PID]: sqlca: code: 0, state: 00000
41+
[NO_PID]: ECPGtrans line 105 action = commit connection = regress1
3842
[NO_PID]: sqlca: code: 0, state: 00000
3943
[NO_PID]: ecpg_finish: Connection regress1 closed.
4044
[NO_PID]: sqlca: code: 0, state: 00000

‎src/interfaces/ecpg/test/expected/sql-dynalloc.c

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -177,112 +177,119 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
177177
#line 33 "dynalloc.pgc"
178178

179179

180-
{ECPGdo(__LINE__,0,1,NULL,"create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet )",ECPGt_EOIT,ECPGt_EORT);
180+
{ECPGdo(__LINE__,0,1,NULL,"set datestyle to mdy",ECPGt_EOIT,ECPGt_EORT);
181181
#line 35 "dynalloc.pgc"
182182

183183
if (sqlca.sqlcode<0)sqlprint ( );}
184184
#line 35 "dynalloc.pgc"
185185

186+
187+
{ECPGdo(__LINE__,0,1,NULL,"create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) ",ECPGt_EOIT,ECPGt_EORT);
188+
#line 37 "dynalloc.pgc"
189+
190+
if (sqlca.sqlcode<0)sqlprint ( );}
191+
#line 37 "dynalloc.pgc"
192+
186193
{ECPGdo(__LINE__,0,1,NULL,"insert into test ( b , c , d , e , f , g , h , i ) values( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' )",ECPGt_EOIT,ECPGt_EORT);
187-
#line36 "dynalloc.pgc"
194+
#line38 "dynalloc.pgc"
188195

189196
if (sqlca.sqlcode<0)sqlprint ( );}
190-
#line36 "dynalloc.pgc"
197+
#line38 "dynalloc.pgc"
191198

192199
{ECPGdo(__LINE__,0,1,NULL,"insert into test ( b , c , d , e , f , g , h , i ) values( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null )",ECPGt_EOIT,ECPGt_EORT);
193-
#line37 "dynalloc.pgc"
200+
#line39 "dynalloc.pgc"
194201

195202
if (sqlca.sqlcode<0)sqlprint ( );}
196-
#line37 "dynalloc.pgc"
203+
#line39 "dynalloc.pgc"
197204

198205

199206
ECPGallocate_desc(__LINE__,"mydesc");
200-
#line39 "dynalloc.pgc"
207+
#line41 "dynalloc.pgc"
201208

202209
if (sqlca.sqlcode<0)sqlprint ( );
203-
#line39 "dynalloc.pgc"
210+
#line41 "dynalloc.pgc"
204211

205212
{ECPGdo(__LINE__,0,1,NULL,"select a , b , c , d , e , f , g , h , i from test order by a",ECPGt_EOIT,
206213
ECPGt_descriptor,"mydesc",0L,0L,0L,
207214
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);
208-
#line40 "dynalloc.pgc"
215+
#line42 "dynalloc.pgc"
209216

210217
if (sqlca.sqlcode<0)sqlprint ( );}
211-
#line40 "dynalloc.pgc"
218+
#line42 "dynalloc.pgc"
212219

213220
{ECPGget_desc(__LINE__,"mydesc",1,ECPGd_indicator,
214221
ECPGt_int,&(i1),(long)1,(long)0,sizeof(int),ECPGd_data,
215222
ECPGt_int,&(d1),(long)1,(long)0,sizeof(int),ECPGd_EODT);
216223

217-
#line41 "dynalloc.pgc"
224+
#line43 "dynalloc.pgc"
218225

219226
if (sqlca.sqlcode<0)sqlprint ( );}
220-
#line41 "dynalloc.pgc"
227+
#line43 "dynalloc.pgc"
221228

222229
{ECPGget_desc(__LINE__,"mydesc",2,ECPGd_indicator,
223230
ECPGt_int,&(i2),(long)1,(long)0,sizeof(int),ECPGd_data,
224231
ECPGt_double,&(d2),(long)1,(long)0,sizeof(double),ECPGd_EODT);
225232

226-
#line42 "dynalloc.pgc"
233+
#line44 "dynalloc.pgc"
227234

228235
if (sqlca.sqlcode<0)sqlprint ( );}
229-
#line42 "dynalloc.pgc"
236+
#line44 "dynalloc.pgc"
230237

231238
{ECPGget_desc(__LINE__,"mydesc",3,ECPGd_indicator,
232239
ECPGt_int,&(i3),(long)1,(long)0,sizeof(int),ECPGd_data,
233240
ECPGt_char,&(d3),(long)0,(long)0,(1)*sizeof(char),ECPGd_EODT);
234241

235-
#line43 "dynalloc.pgc"
242+
#line45 "dynalloc.pgc"
236243

237244
if (sqlca.sqlcode<0)sqlprint ( );}
238-
#line43 "dynalloc.pgc"
245+
#line45 "dynalloc.pgc"
239246

240247
{ECPGget_desc(__LINE__,"mydesc",4,ECPGd_indicator,
241248
ECPGt_int,&(i4),(long)1,(long)0,sizeof(int),ECPGd_data,
242249
ECPGt_char,&(d4),(long)0,(long)0,(1)*sizeof(char),ECPGd_EODT);
243250

244-
#line44 "dynalloc.pgc"
251+
#line46 "dynalloc.pgc"
245252

246253
if (sqlca.sqlcode<0)sqlprint ( );}
247-
#line44 "dynalloc.pgc"
254+
#line46 "dynalloc.pgc"
248255

249256
{ECPGget_desc(__LINE__,"mydesc",5,ECPGd_indicator,
250257
ECPGt_int,&(i5),(long)1,(long)0,sizeof(int),ECPGd_data,
251258
ECPGt_char,&(d5),(long)0,(long)0,(1)*sizeof(char),ECPGd_EODT);
252259

253-
#line45 "dynalloc.pgc"
260+
#line47 "dynalloc.pgc"
254261

255262
if (sqlca.sqlcode<0)sqlprint ( );}
256-
#line45 "dynalloc.pgc"
263+
#line47 "dynalloc.pgc"
257264

258265
{ECPGget_desc(__LINE__,"mydesc",6,ECPGd_indicator,
259266
ECPGt_int,&(i6),(long)1,(long)0,sizeof(int),ECPGd_data,
260267
ECPGt_char,&(d6),(long)0,(long)0,(1)*sizeof(char),ECPGd_EODT);
261268

262-
#line46 "dynalloc.pgc"
269+
#line48 "dynalloc.pgc"
263270

264271
if (sqlca.sqlcode<0)sqlprint ( );}
265-
#line46 "dynalloc.pgc"
272+
#line48 "dynalloc.pgc"
266273

267274
{ECPGget_desc(__LINE__,"mydesc",7,ECPGd_indicator,
268275
ECPGt_int,&(i7),(long)1,(long)0,sizeof(int),ECPGd_data,
269276
ECPGt_char,&(d7),(long)0,(long)0,(1)*sizeof(char),ECPGd_EODT);
270277

271-
#line47 "dynalloc.pgc"
278+
#line49 "dynalloc.pgc"
272279

273280
if (sqlca.sqlcode<0)sqlprint ( );}
274-
#line47 "dynalloc.pgc"
281+
#line49 "dynalloc.pgc"
275282

276283
/* skip box for now */
277284
/* exec sql get descriptor mydesc value 8 :d8=DATA, :i8=INDICATOR; */
278285
{ECPGget_desc(__LINE__,"mydesc",9,ECPGd_indicator,
279286
ECPGt_int,&(i9),(long)1,(long)0,sizeof(int),ECPGd_data,
280287
ECPGt_char,&(d9),(long)0,(long)0,(1)*sizeof(char),ECPGd_EODT);
281288

282-
#line50 "dynalloc.pgc"
289+
#line52 "dynalloc.pgc"
283290

284291
if (sqlca.sqlcode<0)sqlprint ( );}
285-
#line50 "dynalloc.pgc"
292+
#line52 "dynalloc.pgc"
286293

287294

288295
printf("Result:\n");
@@ -318,16 +325,16 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
318325
printf("\n");
319326

320327
ECPGdeallocate_desc(__LINE__,"mydesc");
321-
#line84 "dynalloc.pgc"
328+
#line86 "dynalloc.pgc"
322329

323330
if (sqlca.sqlcode<0)sqlprint ( );
324-
#line84 "dynalloc.pgc"
331+
#line86 "dynalloc.pgc"
325332

326333
{ECPGdisconnect(__LINE__,"CURRENT");
327-
#line85 "dynalloc.pgc"
334+
#line87 "dynalloc.pgc"
328335

329336
if (sqlca.sqlcode<0)sqlprint ( );}
330-
#line85 "dynalloc.pgc"
337+
#line87 "dynalloc.pgc"
331338

332339
return0;
333340
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp