diff options
author | Michael Meskes <meskes@postgresql.org> | 2003-09-26 15:16:29 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2003-09-26 15:16:29 +0000 |
commit | e11136e4a525aa6a9d940cd774eaae41d3385a0b (patch) | |
tree | 8ff8b2068a09e234984110cfe938e533769b2ac2 /src/interfaces/ecpg/preproc | |
parent | 8d108fb1669e5f475b22b760eb37c65a8b1877a0 (diff) |
Fixed segfault after error in parsing precision argument.
Diffstat (limited to 'src/interfaces/ecpg/preproc')
-rw-r--r-- | src/interfaces/ecpg/preproc/preproc.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index b49a85af4ff..2008c42c9cd 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.260 2003/09/24 19:05:32 momjian Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.261 2003/09/26 15:16:29 meskes Exp $ */ /* Copyright comment */ %{ @@ -4785,7 +4785,11 @@ common_type: simple_type $$.type_str = make_str("decimal"); } else + { mmerror(PARSE_ERROR, ET_ERROR, "Only numeric/decimal have precision/scale argument"); + $$.type_enum = ECPGt_numeric; + $$.type_str = make_str("numeric"); + } $$.type_dimension = make_str("-1"); $$.type_index = make_str("-1"); |