PostgreSQL Source Code: src/interfaces/ecpg/test/expected/preproc-cursor.c File Reference (original) (raw)

53{

54

55

56

57

58

59

60

61

62

63

64

65#line 23 "cursor.pgc"

66 char * stmt1 = "SELECT id, t FROM t1" ;

67

68#line 24 "cursor.pgc"

69 char * curname1 = CURNAME ;

70

71#line 25 "cursor.pgc"

72 char * curname2 = CURNAME ;

73

74#line 26 "cursor.pgc"

75 char * curname3 = CURNAME ;

76

77#line 27 "cursor.pgc"

78 struct varchar_1 { int len; char arr[ 50 ]; } curname4 ;

79

80#line 28 "cursor.pgc"

81 char * curname5 = CURNAME ;

82

83#line 29 "cursor.pgc"

84 int count ;

85

86#line 30 "cursor.pgc"

87 int id ;

88

89#line 31 "cursor.pgc"

90 char t [ 64 ] ;

91

92#line 32 "cursor.pgc"

93

94

95 char msg[128];

96

98

99 strcpy(msg, "connect");

100 { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "test1", 0);

101#line 39 "cursor.pgc"

102

103if (sqlca.sqlcode < 0) exit (1);}

104#line 39 "cursor.pgc"

105

106 { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "test2", 0);

107#line 40 "cursor.pgc"

108

109if (sqlca.sqlcode < 0) exit (1);}

110#line 40 "cursor.pgc"

111

112

113 strcpy(msg, "set");

115#line 43 "cursor.pgc"

116

117if (sqlca.sqlcode < 0) exit (1);}

118#line 43 "cursor.pgc"

119

120

121 strcpy(msg, "create");

123#line 46 "cursor.pgc"

124

125if (sqlca.sqlcode < 0) exit (1);}

126#line 46 "cursor.pgc"

127

129#line 47 "cursor.pgc"

130

131if (sqlca.sqlcode < 0) exit (1);}

132#line 47 "cursor.pgc"

133

134

135 strcpy(msg, "insert");

136 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'a' )", ECPGt_EOIT, ECPGt_EORT);

137#line 50 "cursor.pgc"

138

139if (sqlca.sqlcode < 0) exit (1);}

140#line 50 "cursor.pgc"

141

142 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'b' )", ECPGt_EOIT, ECPGt_EORT);

143#line 51 "cursor.pgc"

144

145if (sqlca.sqlcode < 0) exit (1);}

146#line 51 "cursor.pgc"

147

148 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'c' )", ECPGt_EOIT, ECPGt_EORT);

149#line 52 "cursor.pgc"

150

151if (sqlca.sqlcode < 0) exit (1);}

152#line 52 "cursor.pgc"

153

154 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'd' )", ECPGt_EOIT, ECPGt_EORT);

155#line 53 "cursor.pgc"

156

157if (sqlca.sqlcode < 0) exit (1);}

158#line 53 "cursor.pgc"

159

160 { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'e' )", ECPGt_EOIT, ECPGt_EORT);

161#line 54 "cursor.pgc"

162

163if (sqlca.sqlcode < 0) exit (1);}

164#line 54 "cursor.pgc"

165

166

167 strcpy(msg, "commit");

168 { ECPGtrans(__LINE__, "test1", "commit");

169#line 57 "cursor.pgc"

170

171if (sqlca.sqlcode < 0) exit (1);}

172#line 57 "cursor.pgc"

173

174 { ECPGtrans(__LINE__, "test2", "commit");

175#line 58 "cursor.pgc"

176

177if (sqlca.sqlcode < 0) exit (1);}

178#line 58 "cursor.pgc"

179

180

181

182

183 strcpy(msg, "declare");

184 ECPGset_var( 0, &( curname1 ), __LINE__);\

185

186#line 64 "cursor.pgc"

187

188if (sqlca.sqlcode < 0) exit (1);

189#line 64 "cursor.pgc"

190

191#line 64 "cursor.pgc"

192

193

194 strcpy(msg, "open");

195 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1",

196 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

198#line 67 "cursor.pgc"

199

200if (sqlca.sqlcode < 0) exit (1);}

201#line 67 "cursor.pgc"

202

203

204 strcpy(msg, "fetch from");

205 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch forward from $0",

206 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

208 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

210 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

212#line 70 "cursor.pgc"

213

214if (sqlca.sqlcode < 0) exit (1);}

215#line 70 "cursor.pgc"

216

217 printf("%d %s\n", id, t);

218

219 strcpy(msg, "fetch");

221 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

223 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

225 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

227#line 74 "cursor.pgc"

228

229if (sqlca.sqlcode < 0) exit (1);}

230#line 74 "cursor.pgc"

231

232 printf("%d %s\n", id, t);

233

234 strcpy(msg, "fetch 1 from");

236 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

238 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

240 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

242#line 78 "cursor.pgc"

243

244if (sqlca.sqlcode < 0) exit (1);}

245#line 78 "cursor.pgc"

246

247 printf("%d %s\n", id, t);

248

249 strcpy(msg, "fetch :count from");

250 count = 1;

252 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

254 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

256 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

258 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

260#line 83 "cursor.pgc"

261

262if (sqlca.sqlcode < 0) exit (1);}

263#line 83 "cursor.pgc"

264

265 printf("%d %s\n", id, t);

266

267 strcpy(msg, "move in");

268 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 in $0",

269 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

271#line 87 "cursor.pgc"

272

273if (sqlca.sqlcode < 0) exit (1);}

274#line 87 "cursor.pgc"

275

276

277 strcpy(msg, "fetch 1");

279 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

281 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

283 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

285#line 90 "cursor.pgc"

286

287if (sqlca.sqlcode < 0) exit (1);}

288#line 90 "cursor.pgc"

289

290 printf("%d %s\n", id, t);

291

292 strcpy(msg, "fetch :count");

293 count = 1;

295 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

297 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

299 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

301 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

303#line 95 "cursor.pgc"

304

305if (sqlca.sqlcode < 0) exit (1);}

306#line 95 "cursor.pgc"

307

308 printf("%d %s\n", id, t);

309

310 strcpy(msg, "close");

312 ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),

314#line 99 "cursor.pgc"

315

316if (sqlca.sqlcode < 0) exit (1);}

317#line 99 "cursor.pgc"

318

319

320

321

322 strcpy(msg, "declare");

323 ECPGset_var( 1, &( curname2 ), __LINE__);\

324 ECPGset_var( 2, ( t ), __LINE__);\

325 ECPGset_var( 3, &( id ), __LINE__);\

326

327#line 105 "cursor.pgc"

328

329if (sqlca.sqlcode < 0) exit (1);

330#line 105 "cursor.pgc"

331

332#line 105 "cursor.pgc"

333

334

335 strcpy(msg, "open");

336 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1",

337 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

339 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

341 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

343#line 108 "cursor.pgc"

344

345if (sqlca.sqlcode < 0) exit (1);}

346#line 108 "cursor.pgc"

347

348

349 strcpy(msg, "fetch from");

351 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

353 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

355 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

357#line 111 "cursor.pgc"

358

359if (sqlca.sqlcode < 0) exit (1);}

360#line 111 "cursor.pgc"

361

362 printf("%d %s\n", id, t);

363

364 strcpy(msg, "fetch");

366 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

368 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

370 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

372#line 115 "cursor.pgc"

373

374if (sqlca.sqlcode < 0) exit (1);}

375#line 115 "cursor.pgc"

376

377 printf("%d %s\n", id, t);

378

379 strcpy(msg, "fetch 1 from");

381 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

383 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

385 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

387#line 119 "cursor.pgc"

388

389if (sqlca.sqlcode < 0) exit (1);}

390#line 119 "cursor.pgc"

391

392 printf("%d %s\n", id, t);

393

394 strcpy(msg, "fetch :count from");

395 count = 1;

397 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

399 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

401 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

403 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

405#line 124 "cursor.pgc"

406

407if (sqlca.sqlcode < 0) exit (1);}

408#line 124 "cursor.pgc"

409

410 printf("%d %s\n", id, t);

411

412 strcpy(msg, "move");

413 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0",

414 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

416 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

418 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

420#line 128 "cursor.pgc"

421

422if (sqlca.sqlcode < 0) exit (1);}

423#line 128 "cursor.pgc"

424

425

426 strcpy(msg, "fetch 1");

428 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

430 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

432 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

434#line 131 "cursor.pgc"

435

436if (sqlca.sqlcode < 0) exit (1);}

437#line 131 "cursor.pgc"

438

439 printf("%d %s\n", id, t);

440

441 strcpy(msg, "fetch :count");

442 count = 1;

444 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

446 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

448 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

450 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

452#line 136 "cursor.pgc"

453

454if (sqlca.sqlcode < 0) exit (1);}

455#line 136 "cursor.pgc"

456

457 printf("%d %s\n", id, t);

458

459 strcpy(msg, "close");

461 ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),

463#line 140 "cursor.pgc"

464

465if (sqlca.sqlcode < 0) exit (1);}

466#line 140 "cursor.pgc"

467

468

469

470

471 strcpy(msg, "prepare");

472 { ECPGprepare(__LINE__, "test1", 0, "st_id1", stmt1);

473#line 145 "cursor.pgc"

474

475if (sqlca.sqlcode < 0) exit (1);}

476#line 145 "cursor.pgc"

477

478 { ECPGprepare(__LINE__, "test2", 0, "st_id1", stmt1);

479#line 146 "cursor.pgc"

480

481if (sqlca.sqlcode < 0) exit (1);}

482#line 146 "cursor.pgc"

483

484

485 strcpy(msg, "declare");

486 ECPGset_var( 4, &( curname3 ), __LINE__);\

487

488#line 149 "cursor.pgc"

489

490if (sqlca.sqlcode < 0) exit (1);

491#line 149 "cursor.pgc"

492

493#line 149 "cursor.pgc"

494

495 ECPGset_var( 5, &( curname5 ), __LINE__);\

496

497#line 150 "cursor.pgc"

498

499if (sqlca.sqlcode < 0) exit (1);

500#line 150 "cursor.pgc"

501

502#line 150 "cursor.pgc"

503

504

505 strcpy(msg, "open");

506 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare 0cursorfor0 cursor for 0cursorfor1",

507 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

511#line 153 "cursor.pgc"

512

513if (sqlca.sqlcode < 0) exit (1);}

514#line 153 "cursor.pgc"

515

516 { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "declare 0cursorfor0 cursor for 0cursorfor1",

517 ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char),

521#line 154 "cursor.pgc"

522

523if (sqlca.sqlcode < 0) exit (1);}

524#line 154 "cursor.pgc"

525

526

527 strcpy(msg, "fetch");

529 ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char),

531 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

533 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

535#line 157 "cursor.pgc"

536

537if (sqlca.sqlcode < 0) exit (1);}

538#line 157 "cursor.pgc"

539

540 printf("%d %s\n", id, t);

541

542 strcpy(msg, "fetch from");

544 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

546 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

548 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

550#line 161 "cursor.pgc"

551

552if (sqlca.sqlcode < 0) exit (1);}

553#line 161 "cursor.pgc"

554

555 printf("%d %s\n", id, t);

556

557 strcpy(msg, "fetch 1 from");

559 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

561 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

563 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

565#line 165 "cursor.pgc"

566

567if (sqlca.sqlcode < 0) exit (1);}

568#line 165 "cursor.pgc"

569

570 printf("%d %s\n", id, t);

571

572 strcpy(msg, "fetch :count from");

573 count = 1;

575 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

577 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

579 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

581 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

583#line 170 "cursor.pgc"

584

585if (sqlca.sqlcode < 0) exit (1);}

586#line 170 "cursor.pgc"

587

588 printf("%d %s\n", id, t);

589

590 strcpy(msg, "move");

591 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0",

592 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

594#line 174 "cursor.pgc"

595

596if (sqlca.sqlcode < 0) exit (1);}

597#line 174 "cursor.pgc"

598

599

600 strcpy(msg, "fetch 1");

602 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

604 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

606 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

608#line 177 "cursor.pgc"

609

610if (sqlca.sqlcode < 0) exit (1);}

611#line 177 "cursor.pgc"

612

613 printf("%d %s\n", id, t);

614

615 strcpy(msg, "fetch :count");

616 count = 1;

618 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

620 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

622 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

624 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

626#line 182 "cursor.pgc"

627

628if (sqlca.sqlcode < 0) exit (1);}

629#line 182 "cursor.pgc"

630

631 printf("%d %s\n", id, t);

632

633 strcpy(msg, "close");

635 ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),

637#line 186 "cursor.pgc"

638

639if (sqlca.sqlcode < 0) exit (1);}

640#line 186 "cursor.pgc"

641

643 ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char),

645#line 187 "cursor.pgc"

646

647if (sqlca.sqlcode < 0) exit (1);}

648#line 187 "cursor.pgc"

649

650

651 strcpy(msg, "deallocate prepare");

653#line 190 "cursor.pgc"

654

655if (sqlca.sqlcode < 0) exit (1);}

656#line 190 "cursor.pgc"

657

659#line 191 "cursor.pgc"

660

661if (sqlca.sqlcode < 0) exit (1);}

662#line 191 "cursor.pgc"

663

664

665

666

667

668 curname4.len = strlen(CURNAME);

669 strcpy(curname4.arr, CURNAME);

670

671 strcpy(msg, "prepare");

672 { ECPGprepare(__LINE__, "test1", 0, "st_id2", stmt1);

673#line 200 "cursor.pgc"

674

675if (sqlca.sqlcode < 0) exit (1);}

676#line 200 "cursor.pgc"

677

678

679 strcpy(msg, "declare");

680 ECPGset_var( 6, &( curname4 ), __LINE__);\

681

682#line 203 "cursor.pgc"

683

684if (sqlca.sqlcode < 0) exit (1);

685#line 203 "cursor.pgc"

686

687#line 203 "cursor.pgc"

688

689

690 strcpy(msg, "open");

691 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare 0cursorfor0 cursor for 0cursorfor1",

692 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

696#line 206 "cursor.pgc"

697

698if (sqlca.sqlcode < 0) exit (1);}

699#line 206 "cursor.pgc"

700

701

702 strcpy(msg, "fetch from");

704 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

706 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

708 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

710#line 209 "cursor.pgc"

711

712if (sqlca.sqlcode < 0) exit (1);}

713#line 209 "cursor.pgc"

714

715 printf("%d %s\n", id, t);

716

717 strcpy(msg, "fetch");

719 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

721 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

723 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

725#line 213 "cursor.pgc"

726

727if (sqlca.sqlcode < 0) exit (1);}

728#line 213 "cursor.pgc"

729

730 printf("%d %s\n", id, t);

731

732 strcpy(msg, "fetch 1 from");

734 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

736 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

738 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

740#line 217 "cursor.pgc"

741

742if (sqlca.sqlcode < 0) exit (1);}

743#line 217 "cursor.pgc"

744

745 printf("%d %s\n", id, t);

746

747 strcpy(msg, "fetch :count from");

748 count = 1;

750 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

752 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

754 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

756 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

758#line 222 "cursor.pgc"

759

760if (sqlca.sqlcode < 0) exit (1);}

761#line 222 "cursor.pgc"

762

763 printf("%d %s\n", id, t);

764

765 strcpy(msg, "move");

766 { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0",

767 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

769#line 226 "cursor.pgc"

770

771if (sqlca.sqlcode < 0) exit (1);}

772#line 226 "cursor.pgc"

773

774

775 strcpy(msg, "fetch 1");

777 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

779 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

781 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

783#line 229 "cursor.pgc"

784

785if (sqlca.sqlcode < 0) exit (1);}

786#line 229 "cursor.pgc"

787

788 printf("%d %s\n", id, t);

789

790 strcpy(msg, "fetch :count");

791 count = 1;

793 ECPGt_int,&(count),(long)1,(long)1,sizeof(int),

795 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

797 ECPGt_int,&(id),(long)1,(long)1,sizeof(int),

799 ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),

801#line 234 "cursor.pgc"

802

803if (sqlca.sqlcode < 0) exit (1);}

804#line 234 "cursor.pgc"

805

806 printf("%d %s\n", id, t);

807

808 strcpy(msg, "close");

810 ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),

812#line 238 "cursor.pgc"

813

814if (sqlca.sqlcode < 0) exit (1);}

815#line 238 "cursor.pgc"

816

817

818 strcpy(msg, "deallocate prepare");

820#line 241 "cursor.pgc"

821

822if (sqlca.sqlcode < 0) exit (1);}

823#line 241 "cursor.pgc"

824

825

826

827

828 strcpy(msg, "drop");

830#line 246 "cursor.pgc"

831

832if (sqlca.sqlcode < 0) exit (1);}

833#line 246 "cursor.pgc"

834

836#line 247 "cursor.pgc"

837

838if (sqlca.sqlcode < 0) exit (1);}

839#line 247 "cursor.pgc"

840

841

842 strcpy(msg, "commit");

843 { ECPGtrans(__LINE__, "test1", "commit");

844#line 250 "cursor.pgc"

845

846if (sqlca.sqlcode < 0) exit (1);}

847#line 250 "cursor.pgc"

848

849

850 strcpy(msg, "disconnect");

852#line 253 "cursor.pgc"

853

854if (sqlca.sqlcode < 0) exit (1);}

855#line 253 "cursor.pgc"

856

857

858 return 0;

859}

bool ECPGdisconnect(int lineno, const char *connection_name)

bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)

bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)

void ECPGset_var(int number, void *pointer, int lineno)

bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)

char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)

bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)

bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)