Skip to content

Commit 9eaba23

Browse files
committed
Make TupleDescInitBuiltinEntry throw error for unsupported types.
Previously, it would just pass back a partially-uninitialized tupdesc, which doesn't seem like a safe or useful behavior. Backpatch to v10 where this code came in. Discussion: https://postgr.es/m/30830.1544384975@sss.pgh.pa.us
1 parent 54f24ab commit 9eaba23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/access/common/tupdesc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,9 @@ TupleDescInitBuiltinEntry(TupleDesc desc,
643643
att->attstorage = 'p';
644644
att->attcollation = InvalidOid;
645645
break;
646+
647+
default:
648+
elog(ERROR, "unsupported type %u", oidtypeid);
646649
}
647650
}
648651

0 commit comments

Comments
 (0)