1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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
This commit is contained in:
Tom Lane
2018-12-10 10:38:48 -05:00
parent eeeb1dfc87
commit b7a29695f7

View File

@ -744,6 +744,9 @@ TupleDescInitBuiltinEntry(TupleDesc desc,
att->attstorage = 'p';
att->attcollation = InvalidOid;
break;
default:
elog(ERROR, "unsupported type %u", oidtypeid);
}
}