AFAIK, Signal doesn’t provide any way to prove its application were built from non-modified audited free open source code. Indeed there are evidences it behaves “a bit” differently.
So unless you’ve built application by yourself, you have no guarantee of it’s sequrity.
As a PostgreSQL smallish contributor I just can say: NO, DON'T DO THIS!!!!
Extensible type system is a worst thing that could happend with database end-user performance. Then one may not short-cut no single thing in query parsing and optimization: you must check type of any single operand, find correct operator implemenation, find correct index operator family/class and many more all through querying system catalog. And input/output of values are also goes through the functions, stored in system catalog. You may not even answer to "select 1" without consulting with system catalog.
There should be sane set of builtin types + struct/json like way of composition. That is like most DBs do except PostgreSQL. And I strongly believe it is right way.
Built-in is also possible: just fork once after start, and you have parent as watchdog and restarter.