aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-12-10 10:38:49 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-12-10 10:38:49 -0500
commit9eaba23c414d9da1e767e1af0a80cb687dc358e2 (patch)
treef7e543b1c70df94286d3aa4b8bfc6ec5ac08ef6e /src
parent54f24ab76dedb69c03fe4b271c7f53a351637df3 (diff)
downloadpostgresql-9eaba23c414d9da1e767e1af0a80cb687dc358e2.tar.gz
postgresql-9eaba23c414d9da1e767e1af0a80cb687dc358e2.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/common/tupdesc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c
index 9fd7b4e019b..129176f6b71 100644
--- a/src/backend/access/common/tupdesc.c
+++ b/src/backend/access/common/tupdesc.c
@@ -643,6 +643,9 @@ TupleDescInitBuiltinEntry(TupleDesc desc,
att->attstorage = 'p';
att->attcollation = InvalidOid;
break;
+
+ default:
+ elog(ERROR, "unsupported type %u", oidtypeid);
}
}