diff options
| author | Bruce Momjian <bruce@momjian.us> | 1998-02-13 19:46:22 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1998-02-13 19:46:22 +0000 |
| commit | edd366889563fa7c68f2cadb2d64e76197523538 (patch) | |
| tree | 5773726bcee4247ab064ca78a743922e2a1454b9 /src/backend/parser | |
| parent | ce88b9b40b7ecd6404c9315f70dbe8b1595a4925 (diff) | |
| download | postgresql-edd366889563fa7c68f2cadb2d64e76197523538.tar.gz | |
Atttypmod cleanup.
Diffstat (limited to 'src/backend/parser')
| -rw-r--r-- | src/backend/parser/parse_node.c | 16 | ||||
| -rw-r--r-- | src/backend/parser/parse_target.c | 4 | ||||
| -rw-r--r-- | src/backend/parser/parse_type.c | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index b4ffeeb21a..708bb54103 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.12 1998/02/10 16:03:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.13 1998/02/13 19:45:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -79,7 +79,7 @@ make_operand(char *opname, Assert(nodeTag(result) == T_Const); val = (Datum) textout((struct varlena *) con->constvalue); - infunc = typeidRetinfunc(true_typeId); + infunc = typeidInfunc(true_typeId); con = makeNode(Const); con->consttype = true_typeId; con->constlen = typeLen(true_type); @@ -185,10 +185,10 @@ make_op(char *opname, Node *ltree, Node *rtree) CONVERTABLE_TYPE(rtypeId) && nodeTag(rtree) == T_Const && !((Const *) rtree)->constiscast) { - outfunc = typeidRetoutfunc(rtypeId); - infunc = typeidRetinfunc(ltypeId); + outfunc = typeidOutfunc(rtypeId); + infunc = typeidInfunc(ltypeId); outstr = (char *) fmgr(outfunc, ((Const *) rtree)->constvalue); - ((Const *) rtree)->constvalue = (Datum) fmgr(infunc, outstr); + ((Const *) rtree)->constvalue = (Datum) fmgr(infunc, outstr, -1); pfree(outstr); ((Const *) rtree)->consttype = rtypeId = ltypeId; newtype = typeidType(rtypeId); @@ -200,10 +200,10 @@ make_op(char *opname, Node *ltree, Node *rtree) CONVERTABLE_TYPE(ltypeId) && nodeTag(ltree) == T_Const && !((Const *) ltree)->constiscast) { - outfunc = typeidRetoutfunc(ltypeId); - infunc = typeidRetinfunc(rtypeId); + outfunc = typeidOutfunc(ltypeId); + infunc = typeidInfunc(rtypeId); outstr = (char *) fmgr(outfunc, ((Const *) ltree)->constvalue); - ((Const *) ltree)->constvalue = (Datum) fmgr(infunc, outstr); + ((Const *) ltree)->constvalue = (Datum) fmgr(infunc, outstr, -1); pfree(outstr); ((Const *) ltree)->consttype = ltypeId = rtypeId; newtype = typeidType(ltypeId); diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index 559360cb9d..7dbeb91ce6 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.9 1998/02/10 16:03:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.10 1998/02/13 19:45:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -394,7 +394,7 @@ make_targetlist_expr(ParseState *pstate, lnext(expr) = makeConst(attrtype, attrlen, - (Datum) fmgr(typeidRetinfunc(attrtype), + (Datum) fmgr(typeidInfunc(attrtype), val, typeidTypElem(attrtype), -1), false, true /* Maybe correct-- 80% chance */ , diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c index 0f69f62bf9..6ca081b4e5 100644 --- a/src/backend/parser/parse_type.c +++ b/src/backend/parser/parse_type.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.5 1998/02/10 16:03:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.6 1998/02/13 19:45:45 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -148,7 +148,7 @@ stringTypeString(Type tp, char *string, int16 atttypmod) /* Given a type id, returns the out-conversion function of the type */ Oid -typeidRetoutfunc(Oid type_id) +typeidOutfunc(Oid type_id) { HeapTuple typeTuple; TypeTupleForm type; @@ -158,7 +158,7 @@ typeidRetoutfunc(Oid type_id) ObjectIdGetDatum(type_id), 0, 0, 0); if (!HeapTupleIsValid(typeTuple)) - elog(ERROR, "typeidRetoutfunc: Invalid type - oid = %u", type_id); + elog(ERROR, "typeidOutfunc: Invalid type - oid = %u", type_id); type = (TypeTupleForm) GETSTRUCT(typeTuple); outfunc = type->typoutput; @@ -241,7 +241,7 @@ GetArrayElementType(Oid typearray) /* Given a type id, returns the in-conversion function of the type */ Oid -typeidRetinfunc(Oid type_id) +typeidInfunc(Oid type_id) { HeapTuple typeTuple; TypeTupleForm type; @@ -251,7 +251,7 @@ typeidRetinfunc(Oid type_id) ObjectIdGetDatum(type_id), 0, 0, 0); if (!HeapTupleIsValid(typeTuple)) - elog(ERROR, "typeidRetinfunc: Invalid type - oid = %u", type_id); + elog(ERROR, "typeidInfunc: Invalid type - oid = %u", type_id); type = (TypeTupleForm) GETSTRUCT(typeTuple); infunc = type->typinput; |
