From 35670340f57d78d6ab023b1fb42fd81339f85d4c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 25 Oct 2010 21:40:46 +0300 Subject: Refactor typenameTypeId() Split the old typenameTypeId() into two functions: A new typenameTypeId() that returns only a type OID, and typenameTypeIdAndMod() that returns type OID and typmod. This isolates call sites better that actually care about the typmod. --- src/backend/parser/parse_relation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/parser/parse_relation.c') diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index aa71709b43a..b32ca3cfcd0 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -1165,7 +1165,7 @@ addRangeTableEntryForFunction(ParseState *pstate, errmsg("column \"%s\" cannot be declared SETOF", attrname), parser_errposition(pstate, n->typeName->location))); - attrtype = typenameTypeId(pstate, n->typeName, &attrtypmod); + typenameTypeIdAndMod(pstate, n->typeName, &attrtype, &attrtypmod); eref->colnames = lappend(eref->colnames, makeString(attrname)); rte->funccoltypes = lappend_oid(rte->funccoltypes, attrtype); rte->funccoltypmods = lappend_int(rte->funccoltypmods, attrtypmod); -- cgit v1.2.3