mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Fix a passel of problems with incorrect calls to typinput and typoutput
functions, which would lead to trouble with datatypes that paid attention to the typelem or typmod parameters to these functions. In particular, incorrect code in pg_aggregate.c explains the platform-specific failures that have been reported in NUMERIC avg().
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
* out of its tuple
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.38 2000/01/15 02:59:38 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.39 2000/01/15 22:43:24 tgl Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -1604,7 +1604,6 @@ get_const_expr(Const *constval, deparse_context *context)
|
||||
FmgrInfo finfo_output;
|
||||
char *extval;
|
||||
char *valptr;
|
||||
bool isnull = FALSE;
|
||||
|
||||
typetup = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(constval->consttype),
|
||||
@ -1629,7 +1628,8 @@ get_const_expr(Const *constval, deparse_context *context)
|
||||
|
||||
fmgr_info(typeStruct->typoutput, &finfo_output);
|
||||
extval = (char *) (*fmgr_faddr(&finfo_output)) (constval->constvalue,
|
||||
&isnull, -1);
|
||||
typeStruct->typelem,
|
||||
-1);
|
||||
|
||||
switch (constval->consttype)
|
||||
{
|
||||
|
Reference in New Issue
Block a user