1
- /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.218 2003/05/16 04:59:22 momjian Exp $ */
1
+ /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.219 2003/05/16 11:30:09 meskes Exp $ */
2
2
3
3
/* Copyright comment */
4
4
%{
@@ -4183,6 +4183,14 @@ ecpg_interval: opt_interval { $$ = $1; }
4183
4183
;
4184
4184
4185
4185
single_vt_type : common_type
4186
+ | DOUBLE_P
4187
+ {
4188
+ $$ .type_enum = ECPGt_double;
4189
+ $$ .type_str = make_str(" double" );
4190
+ $$ .type_dimension = make_str(" -1" );
4191
+ $$ .type_index = make_str(" -1" );
4192
+ $$ .type_sizeof = NULL ;
4193
+ }
4186
4194
| ECPGColLabelCommon ecpg_interval
4187
4195
{
4188
4196
if (strlen($2 ) != 0 && strcmp ($1 , " datetime" ) != 0 && strcmp ($1 , " interval" ) != 0 )
@@ -4208,14 +4216,6 @@ single_vt_type: common_type
4208
4216
$$ .type_index = make_str(" -1" );
4209
4217
$$ .type_sizeof = NULL ;
4210
4218
}
4211
- else if (strcmp($1 , " double" ) == 0 )
4212
- {
4213
- $$ .type_enum = ECPGt_double;
4214
- $$ .type_str = make_str(" double" );
4215
- $$ .type_dimension = make_str(" -1" );
4216
- $$ .type_index = make_str(" -1" );
4217
- $$ .type_sizeof = NULL ;
4218
- }
4219
4219
else if (strcmp($1 , " numeric" ) == 0 )
4220
4220
{
4221
4221
$$ .type_enum = ECPGt_numeric;
@@ -4671,7 +4671,7 @@ variable: opt_pointer ECPGColLabelCommon opt_array_bounds opt_initializer
4671
4671
struct ECPGtype * type;
4672
4672
char *dimension = $3 .index1; /* dimension of array */
4673
4673
char *length = $3 .index2; /* lenght of string */
4674
- char dim[14L ], ascii_len[ 12 ] ;
4674
+ char dim[14L ];
4675
4675
4676
4676
adjust_array (actual_type[struct_level].type_enum, &dimension, &length, actual_type[struct_level].type_dimension, actual_type[struct_level].type_index, strlen($1 ));
4677
4677
@@ -5289,11 +5289,11 @@ symbol: ColLabel { $$ = $1; }
5289
5289
5290
5290
/* Column identifier --- names that can be column, table, etc names.
5291
5291
*/
5292
- ColId : ident { $$ = $1 ; }
5292
+ ColId : ident { $$ = $1 ; }
5293
5293
| unreserved_keyword { $$ = $1 ; }
5294
- | col_name_keyword { $$ = $1 ; }
5295
- | ECPGKeywords { $$ = $1 ; }
5296
- | CHAR_P { $$ = make_str(" char" ); }
5294
+ | col_name_keyword { $$ = $1 ; }
5295
+ | ECPGKeywords { $$ = $1 ; }
5296
+ | CHAR_P { $$ = make_str(" char" ); }
5297
5297
;
5298
5298
5299
5299
/* Type identifier --- names that can be type names.
0 commit comments