mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
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.
This commit is contained in:
@@ -607,8 +607,8 @@ CheckCastComment(List *qualname, List *arguments)
|
||||
targettype = (TypeName *) linitial(arguments);
|
||||
Assert(IsA(targettype, TypeName));
|
||||
|
||||
sourcetypeid = typenameTypeId(NULL, sourcetype, NULL);
|
||||
targettypeid = typenameTypeId(NULL, targettype, NULL);
|
||||
sourcetypeid = typenameTypeId(NULL, sourcetype);
|
||||
targettypeid = typenameTypeId(NULL, targettype);
|
||||
|
||||
/* Permission check */
|
||||
if (!pg_type_ownercheck(sourcetypeid, GetUserId())
|
||||
|
Reference in New Issue
Block a user