diff options
| author | Peter Eisentraut | 2010-10-25 18:40:46 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2010-10-25 18:44:49 +0000 |
| commit | 35670340f57d78d6ab023b1fb42fd81339f85d4c (patch) | |
| tree | 353a103641ea21787ace05801ebc9f2a42e61137 /src/include/parser | |
| parent | c6873eac4c33720140240cdbd1a663fecc922c57 (diff) | |
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.
Diffstat (limited to 'src/include/parser')
| -rw-r--r-- | src/include/parser/parse_type.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h index 525502afe92..bab8c48e2fa 100644 --- a/src/include/parser/parse_type.h +++ b/src/include/parser/parse_type.h @@ -23,8 +23,9 @@ extern Type LookupTypeName(ParseState *pstate, const TypeName *typeName, int32 *typmod_p); extern Type typenameType(ParseState *pstate, const TypeName *typeName, int32 *typmod_p); -extern Oid typenameTypeId(ParseState *pstate, const TypeName *typeName, - int32 *typmod_p); +extern Oid typenameTypeId(ParseState *pstate, const TypeName *typeName); +extern void typenameTypeIdAndMod(ParseState *pstate, const TypeName *typeName, + Oid *typeid_p, int32 *typmod_p); extern char *TypeNameToString(const TypeName *typeName); extern char *TypeNameListToString(List *typenames); @@ -40,7 +41,7 @@ extern Datum stringTypeDatum(Type tp, char *string, int32 atttypmod); extern Oid typeidTypeRelid(Oid type_id); -extern void parseTypeString(const char *str, Oid *type_id, int32 *typmod_p); +extern void parseTypeString(const char *str, Oid *typeid_p, int32 *typmod_p); #define ISCOMPLEX(typeid) (typeidTypeRelid(typeid) != InvalidOid) |
