1
- /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.13 2003/07/18 14:32:56 meskes Exp $ */
1
+ /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.14 2003/08/01 08:21:04 meskes Exp $ */
2
2
3
3
#define POSTGRES_ECPG_INTERNAL
4
4
#include "postgres_fe.h"
@@ -34,7 +34,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
34
34
{
35
35
if (* pval != '{' )
36
36
{
37
- ECPGraise (lineno , ECPG_DATA_NOT_ARRAY , NULL );
37
+ ECPGraise (lineno , ECPG_DATA_NOT_ARRAY , NULL , compat );
38
38
return (false);
39
39
}
40
40
@@ -90,13 +90,13 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
90
90
}
91
91
else
92
92
{
93
- ECPGraise (lineno , ECPG_MISSING_INDICATOR , NULL );
93
+ ECPGraise (lineno , ECPG_MISSING_INDICATOR , NULL , compat );
94
94
return (false);
95
95
}
96
96
}
97
97
break ;
98
98
default :
99
- ECPGraise (lineno , ECPG_UNSUPPORTED , ECPGtype_name (ind_type ));
99
+ ECPGraise (lineno , ECPG_UNSUPPORTED , ECPGtype_name (ind_type ), compat );
100
100
return (false);
101
101
break ;
102
102
}
@@ -126,7 +126,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
126
126
if ((isarray && * scan_length != ',' && * scan_length != '}' )
127
127
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
128
128
{
129
- ECPGraise (lineno , ECPG_INT_FORMAT , pval );
129
+ ECPGraise (lineno , ECPG_INT_FORMAT , pval , compat );
130
130
return (false);
131
131
}
132
132
}
@@ -159,7 +159,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
159
159
if ((isarray && * scan_length != ',' && * scan_length != '}' )
160
160
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
161
161
{
162
- ECPGraise (lineno , ECPG_UINT_FORMAT , pval );
162
+ ECPGraise (lineno , ECPG_UINT_FORMAT , pval , compat );
163
163
return (false);
164
164
}
165
165
}
@@ -192,7 +192,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
192
192
if ((isarray && * scan_length != ',' && * scan_length != '}' )
193
193
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
194
194
{
195
- ECPGraise (lineno , ECPG_INT_FORMAT , pval );
195
+ ECPGraise (lineno , ECPG_INT_FORMAT , pval , compat );
196
196
return (false);
197
197
}
198
198
}
@@ -209,7 +209,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
209
209
if ((isarray && * scan_length != ',' && * scan_length != '}' )
210
210
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
211
211
{
212
- ECPGraise (lineno , ECPG_UINT_FORMAT , pval );
212
+ ECPGraise (lineno , ECPG_UINT_FORMAT , pval , compat );
213
213
return (false);
214
214
}
215
215
}
@@ -235,7 +235,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
235
235
if ((isarray && * scan_length != ',' && * scan_length != '}' )
236
236
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
237
237
{
238
- ECPGraise (lineno , ECPG_FLOAT_FORMAT , pval );
238
+ ECPGraise (lineno , ECPG_FLOAT_FORMAT , pval , compat );
239
239
return (false);
240
240
}
241
241
}
@@ -266,7 +266,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
266
266
else if (offset == sizeof (int ))
267
267
* ((int * ) (var + offset * act_tuple )) = false;
268
268
else
269
- ECPGraise (lineno , ECPG_CONVERT_BOOL , "different size" );
269
+ ECPGraise (lineno , ECPG_CONVERT_BOOL , "different size" , compat );
270
270
break ;
271
271
}
272
272
else if (pval [0 ] == 't' && pval [1 ] == '\0' )
@@ -276,7 +276,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
276
276
else if (offset == sizeof (int ))
277
277
* ((int * ) (var + offset * act_tuple )) = true;
278
278
else
279
- ECPGraise (lineno , ECPG_CONVERT_BOOL , "different size" );
279
+ ECPGraise (lineno , ECPG_CONVERT_BOOL , "different size" , compat );
280
280
break ;
281
281
}
282
282
else if (pval [0 ] == '\0' && PQgetisnull (results , act_tuple , act_field ))
@@ -286,7 +286,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
286
286
}
287
287
}
288
288
289
- ECPGraise (lineno , ECPG_CONVERT_BOOL , pval );
289
+ ECPGraise (lineno , ECPG_CONVERT_BOOL , pval , compat );
290
290
return (false);
291
291
break ;
292
292
@@ -396,7 +396,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
396
396
if ((isarray && * scan_length != ',' && * scan_length != '}' )
397
397
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
398
398
{
399
- ECPGraise (lineno , ECPG_NUMERIC_FORMAT , pval );
399
+ ECPGraise (lineno , ECPG_NUMERIC_FORMAT , pval , compat );
400
400
return (false);
401
401
}
402
402
}
@@ -423,7 +423,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
423
423
if ((isarray && * scan_length != ',' && * scan_length != '}' )
424
424
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
425
425
{
426
- ECPGraise (lineno , ECPG_INTERVAL_FORMAT , pval );
426
+ ECPGraise (lineno , ECPG_INTERVAL_FORMAT , pval , compat );
427
427
return (false);
428
428
}
429
429
}
@@ -446,7 +446,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
446
446
if ((isarray && * scan_length != ',' && * scan_length != '}' )
447
447
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
448
448
{
449
- ECPGraise (lineno , ECPG_DATE_FORMAT , pval );
449
+ ECPGraise (lineno , ECPG_DATE_FORMAT , pval , compat );
450
450
return (false);
451
451
}
452
452
@@ -468,7 +468,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
468
468
if ((isarray && * scan_length != ',' && * scan_length != '}' )
469
469
|| (!isarray && * scan_length != '\0' && * scan_length != ' ' )) /* Garbage left */
470
470
{
471
- ECPGraise (lineno , ECPG_TIMESTAMP_FORMAT , pval );
471
+ ECPGraise (lineno , ECPG_TIMESTAMP_FORMAT , pval , compat );
472
472
return (false);
473
473
}
474
474
@@ -477,7 +477,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
477
477
break ;
478
478
479
479
default :
480
- ECPGraise (lineno , ECPG_UNSUPPORTED , ECPGtype_name (type ));
480
+ ECPGraise (lineno , ECPG_UNSUPPORTED , ECPGtype_name (type ), compat );
481
481
return (false);
482
482
break ;
483
483
}
0 commit comments