1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.24 2001/10/11 20:25:42 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.25 2001/10/18 20:32:58 momjian Exp $
3
3
-->
4
4
5
5
<chapter id="ecpg">
@@ -195,11 +195,11 @@ struct sqlca
195
195
</para>
196
196
197
197
<para>
198
- If an error occurred in the last <acronym>SQL</acronym> statement.
199
- <parameter>sqlca.sqlcode</parameter> will be non-zero . If
200
- <parameter>sqlca.sqlcode</parameter> is less that 0 , this is a
198
+ If an no error occurred in the last <acronym>SQL</acronym> statement.
199
+ <parameter>sqlca.sqlcode</parameter> will be 0 (ECPG_NO_ERROR) . If
200
+ <parameter>sqlca.sqlcode</parameter> is less that zero , this is a
201
201
serious error, like the database definition does not match the
202
- query. If it is greater than 0 , it is a normal error like the
202
+ query. If it is greater than zero , it is a normal error like the
203
203
table did not contain the requested row.
204
204
</para>
205
205
@@ -210,7 +210,7 @@ struct sqlca
210
210
</para>
211
211
212
212
<para>
213
- List of errors that can occur:
213
+ These are the errors that can occur:
214
214
215
215
<variablelist>
216
216
<varlistentry>
@@ -224,7 +224,7 @@ struct sqlca
224
224
</varlistentry>
225
225
226
226
<varlistentry>
227
- <term><computeroutput>-200, Unsupported type %s on line %d.</computeroutput></term>
227
+ <term><computeroutput>-200 (ECPG_UNSUPPORTED) , Unsupported type %s on line %d.</computeroutput></term>
228
228
<listitem>
229
229
<para>
230
230
Should not normally occur. This indicates the preprocessor has
@@ -236,7 +236,7 @@ struct sqlca
236
236
</varlistentry>
237
237
238
238
<varlistentry>
239
- <term><computeroutput>-201, Too many arguments line %d.</computeroutput></term>
239
+ <term><computeroutput>-201 (ECPG_TOO_MANY_ARGUMENTS) , Too many arguments line %d.</computeroutput></term>
240
240
<listitem>
241
241
<para>
242
242
This means that <productname>Postgres</productname> has
@@ -248,7 +248,7 @@ struct sqlca
248
248
</varlistentry>
249
249
250
250
<varlistentry>
251
- <term><computeroutput>-202, Too few arguments line %d.</computeroutput></term>
251
+ <term><computeroutput>-202 (ECPG_TOO_FEW_ARGUMENTS) , Too few arguments line %d.</computeroutput></term>
252
252
<listitem>
253
253
<para>
254
254
This means that <productname>Postgres</productname> has
@@ -260,7 +260,7 @@ struct sqlca
260
260
</varlistentry>
261
261
262
262
<varlistentry>
263
- <term><computeroutput>-203, Too many matches line %d.</computeroutput></term>
263
+ <term><computeroutput>-203 (ECPG_TOO_MANY_MATCHES) , Too many matches line %d.</computeroutput></term>
264
264
<listitem>
265
265
<para>
266
266
This means the query has returned several rows but the
@@ -271,7 +271,7 @@ struct sqlca
271
271
</varlistentry>
272
272
273
273
<varlistentry>
274
- <term><computeroutput>-204, Not correctly formatted int type: %s line %d.</computeroutput></term>
274
+ <term><computeroutput>-204 (ECPG_INT_FORMAT) , Not correctly formatted int type: %s line %d.</computeroutput></term>
275
275
<listitem>
276
276
<para>
277
277
This means the host variable is of type <type>int</type> and
@@ -284,7 +284,7 @@ struct sqlca
284
284
</varlistentry>
285
285
286
286
<varlistentry>
287
- <term><computeroutput>-205, Not correctly formatted unsigned type: %s line %d.</computeroutput></term>
287
+ <term><computeroutput>-205 (ECPG_UINT_FORMAT) , Not correctly formatted unsigned type: %s line %d.</computeroutput></term>
288
288
<listitem>
289
289
<para>
290
290
This means the host variable is of type <type>unsigned
@@ -298,7 +298,7 @@ struct sqlca
298
298
</varlistentry>
299
299
300
300
<varlistentry>
301
- <term><computeroutput>-206, Not correctly formatted floating point type: %s line %d.</computeroutput></term>
301
+ <term><computeroutput>-206 (ECPG_FLOAT_FORMAT) , Not correctly formatted floating point type: %s line %d.</computeroutput></term>
302
302
<listitem>
303
303
<para>
304
304
This means the host variable is of type <type>float</type> and
@@ -311,7 +311,7 @@ struct sqlca
311
311
</varlistentry>
312
312
313
313
<varlistentry>
314
- <term><computeroutput>-207, Unable to convert %s to bool on line %d.</computeroutput></term>
314
+ <term><computeroutput>-207 (ECPG_CONVERT_BOOL) , Unable to convert %s to bool on line %d.</computeroutput></term>
315
315
<listitem>
316
316
<para>
317
317
This means the host variable is of type <type>bool</type> and
@@ -322,7 +322,7 @@ struct sqlca
322
322
</varlistentry>
323
323
324
324
<varlistentry>
325
- <term><computeroutput>-208, Empty query line %d.</computeroutput></term>
325
+ <term><computeroutput>-208 (ECPG_EMPTY) , Empty query line %d.</computeroutput></term>
326
326
<listitem>
327
327
<para>
328
328
<productname>Postgres</productname> returned <symbol>PGRES_EMPTY_QUERY</symbol>, probably
@@ -332,7 +332,7 @@ struct sqlca
332
332
</varlistentry>
333
333
334
334
<varlistentry>
335
- <term><computeroutput>-209, NULL value without indicator in line %d.</computeroutput></term>
335
+ <term><computeroutput>-209 (ECPG_MISSING_INDICATOR) , NULL value without indicator in line %d.</computeroutput></term>
336
336
<listitem>
337
337
<para>
338
338
<productname>Postgres</productname> returned <symbol>ECPG_MISSING_INDICATOR</symbol>
@@ -342,7 +342,29 @@ struct sqlca
342
342
</varlistentry>
343
343
344
344
<varlistentry>
345
- <term><computeroutput>-220, No such connection %s in line %d.</computeroutput></term>
345
+ <term><computeroutput>-210 (ECPG_NO_ARRAY), Variable is not an array in line %d.</computeroutput></term>
346
+ <listitem>
347
+ <para>
348
+ <productname>Postgres</productname> returned <symbol>ECPG_NO_ARRAY</symbol>
349
+ because an ordinary variable was used in a place that requires
350
+ an array.
351
+ </para>
352
+ </listitem>
353
+ </varlistentry>
354
+
355
+ <varlistentry>
356
+ <term><computeroutput>-211 (ECPG_DATA_NOT_ARRAY), Data read from backend is not an array in line %d.</computeroutput></term>
357
+ <listitem>
358
+ <para>
359
+ <productname>Postgres</productname> returned <symbol>ECPG_DATA_NOT_ARRAY</symbol>
360
+ because the database returned an ordinary variable in a place
361
+ that requires array value.
362
+ </para>
363
+ </listitem>
364
+ </varlistentry>
365
+
366
+ <varlistentry>
367
+ <term><computeroutput>-220 (ECPG_NO_CONN), No such connection %s in line %d.</computeroutput></term>
346
368
<listitem>
347
369
<para>
348
370
The program tried to access a connection that does not exist.
@@ -351,7 +373,7 @@ struct sqlca
351
373
</varlistentry>
352
374
353
375
<varlistentry>
354
- <term><computeroutput>-221, Not connected in line %d.</computeroutput></term>
376
+ <term><computeroutput>-221 (ECPG_NOT_CONN) , Not connected in line %d.</computeroutput></term>
355
377
<listitem>
356
378
<para>
357
379
The program tried to access a connection that does exist but is
@@ -361,7 +383,7 @@ struct sqlca
361
383
</varlistentry>
362
384
363
385
<varlistentry>
364
- <term><computeroutput>-230, Invalid statement name %s in line %d.</computeroutput></term>
386
+ <term><computeroutput>-230 (ECPG_INVALID_STMT) , Invalid statement name %s in line %d.</computeroutput></term>
365
387
<listitem>
366
388
<para>
367
389
The statement you are trying to use has not been prepared.
@@ -370,7 +392,54 @@ struct sqlca
370
392
</varlistentry>
371
393
372
394
<varlistentry>
373
- <term><computeroutput>-400, Postgres error: %s line %d.</computeroutput></term>
395
+ <term><computeroutput>-240 (ECPG_UNKNOWN_DESCRIPTOR), Descriptor %s not found in line %d.</computeroutput></term>
396
+ <listitem>
397
+ <para>
398
+ The descriptor specified was not foundstatement you are trying to use has not been prepared.
399
+ </para>
400
+ </listitem>
401
+ </varlistentry>
402
+
403
+ <varlistentry>
404
+ <term><computeroutput>-241 (ECPG_INVALID_DESCRIPTOR_INDEX), Descriptor index out of range in line %d.</computeroutput></term>
405
+ <listitem>
406
+ <para>
407
+ The descriptor index specified was out of range.
408
+ </para>
409
+ </listitem>
410
+ </varlistentry>
411
+
412
+ <varlistentry>
413
+ <term><computeroutput>-242 (ECPG_UNKNOWN_DESCRIPTOR_ITEM), Descriptor %s not found in line %d.</computeroutput></term>
414
+ <listitem>
415
+ <para>
416
+ The descriptor specified was not foundstatement you are trying to use has not been prepared.
417
+ </para>
418
+ </listitem>
419
+ </varlistentry>
420
+
421
+ <varlistentry>
422
+ <term><computeroutput>-243 (ECPG_VAR_NOT_NUMERIC), Variable is not a numeric type in line %d.</computeroutput></term>
423
+ <listitem>
424
+ <para>
425
+ The database returned a numeric value and the variable was not
426
+ numeric.
427
+ </para>
428
+ </listitem>
429
+ </varlistentry>
430
+
431
+ <varlistentry>
432
+ <term><computeroutput>-244 (ECPG_VAR_NOT_CHAR), Variable is not a character type in line %d.</computeroutput></term>
433
+ <listitem>
434
+ <para>
435
+ The database returned a non-numeric value and the variable was
436
+ numeric.
437
+ </para>
438
+ </listitem>
439
+ </varlistentry>
440
+
441
+ <varlistentry>
442
+ <term><computeroutput>-400 (ECPG_PGSQL), Postgres error: %s line %d.</computeroutput></term>
374
443
<listitem>
375
444
<para>
376
445
Some <productname>Postgres</productname> error.
@@ -381,7 +450,7 @@ struct sqlca
381
450
</varlistentry>
382
451
383
452
<varlistentry>
384
- <term><computeroutput>-401, Error in transaction processing line %d.</computeroutput></term>
453
+ <term><computeroutput>-401 (ECPG_TRANS) , Error in transaction processing line %d.</computeroutput></term>
385
454
<listitem>
386
455
<para>
387
456
<productname>Postgres</productname> signaled that we cannot start,
@@ -391,7 +460,7 @@ struct sqlca
391
460
</varlistentry>
392
461
393
462
<varlistentry>
394
- <term><computeroutput>-402, connect: could not open database %s.</computeroutput></term>
463
+ <term><computeroutput>-402 (ECPG_CONNECT), Could not connect to database %s in line %d .</computeroutput></term>
395
464
<listitem>
396
465
<para>
397
466
The connect to the database did not work.
@@ -400,7 +469,7 @@ struct sqlca
400
469
</varlistentry>
401
470
402
471
<varlistentry>
403
- <term><computeroutput>100, Data not found line %d.</computeroutput></term>
472
+ <term><computeroutput>100 (ECPG_NOT_FOUND) , Data not found line %d.</computeroutput></term>
404
473
<listitem>
405
474
<para>
406
475
This is a <quote>normal</quote> error that tells you that what you are querying cannot
0 commit comments