aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2003-05-16 11:30:09 +0000
committerMichael Meskes <meskes@postgresql.org>2003-05-16 11:30:09 +0000
commit3d41da50f7ec8d976c48c946f7dc0d57bd2ee790 (patch)
tree31175734db792c72be5b18ef3e44689890d75ff0
parent7e684fad02d8943ba5d741f35f883d01021522c7 (diff)
downloadpostgresql-3d41da50f7ec8d976c48c946f7dc0d57bd2ee790.tar.gz
postgresql-3d41da50f7ec8d976c48c946f7dc0d57bd2ee790.zip
Made variable type double work again.
-rw-r--r--src/interfaces/ecpg/ChangeLog4
-rw-r--r--src/interfaces/ecpg/preproc/c_keywords.c1
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y28
3 files changed, 18 insertions, 15 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index d07c9367604..0762cba44b3 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -1418,6 +1418,10 @@ Wed May 14 13:05:49 CEST 2003
Fri May 16 11:45:50 CEST 2003
- Fixed include in pgtypeslib to not include c.h
+
+Fri May 16 13:32:10 CEST 2003
+
+ - Made double variables work again.
- Set ecpg version to 2.12.0.
- Set ecpg library to 3.4.2.
- Set pgtypes library to 1.0.0
diff --git a/src/interfaces/ecpg/preproc/c_keywords.c b/src/interfaces/ecpg/preproc/c_keywords.c
index 04c55f5b3f2..39e089af8bb 100644
--- a/src/interfaces/ecpg/preproc/c_keywords.c
+++ b/src/interfaces/ecpg/preproc/c_keywords.c
@@ -25,7 +25,6 @@ static ScanKeyword ScanKeywords[] = {
{"bool", SQL_BOOL},
{"char", CHAR_P},
{"const", S_CONST},
- {"double", DOUBLE_P},
{"enum", SQL_ENUM},
{"extern", S_EXTERN},
{"float", FLOAT_P},
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index 276f8ccd9a0..95745145d3d 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.218 2003/05/16 04:59:22 momjian Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.219 2003/05/16 11:30:09 meskes Exp $ */
/* Copyright comment */
%{
@@ -4183,6 +4183,14 @@ ecpg_interval: opt_interval { $$ = $1; }
;
single_vt_type: common_type
+ | DOUBLE_P
+ {
+ $$.type_enum = ECPGt_double;
+ $$.type_str = make_str("double");
+ $$.type_dimension = make_str("-1");
+ $$.type_index = make_str("-1");
+ $$.type_sizeof = NULL;
+ }
| ECPGColLabelCommon ecpg_interval
{
if (strlen($2) != 0 && strcmp ($1, "datetime") != 0 && strcmp ($1, "interval") != 0)
@@ -4208,14 +4216,6 @@ single_vt_type: common_type
$$.type_index = make_str("-1");
$$.type_sizeof = NULL;
}
- else if (strcmp($1, "double") == 0)
- {
- $$.type_enum = ECPGt_double;
- $$.type_str = make_str("double");
- $$.type_dimension = make_str("-1");
- $$.type_index = make_str("-1");
- $$.type_sizeof = NULL;
- }
else if (strcmp($1, "numeric") == 0)
{
$$.type_enum = ECPGt_numeric;
@@ -4671,7 +4671,7 @@ variable: opt_pointer ECPGColLabelCommon opt_array_bounds opt_initializer
struct ECPGtype * type;
char *dimension = $3.index1; /* dimension of array */
char *length = $3.index2; /* lenght of string */
- char dim[14L], ascii_len[12];
+ char dim[14L];
adjust_array(actual_type[struct_level].type_enum, &dimension, &length, actual_type[struct_level].type_dimension, actual_type[struct_level].type_index, strlen($1));
@@ -5289,11 +5289,11 @@ symbol: ColLabel { $$ = $1; }
/* Column identifier --- names that can be column, table, etc names.
*/
-ColId: ident { $$ = $1; }
+ColId: ident { $$ = $1; }
| unreserved_keyword { $$ = $1; }
- | col_name_keyword { $$ = $1; }
- | ECPGKeywords { $$ = $1; }
- | CHAR_P { $$ = make_str("char"); }
+ | col_name_keyword { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | CHAR_P { $$ = make_str("char"); }
;
/* Type identifier --- names that can be type names.