Jeff Davis <pgsql@j-davis.com> writes:
> Original report and patch by Karl Schnaitter.
> create table a(u) as select '1';
We should, in fact, fail that to begin with. Unknown-type columns are
a spectactularly horrid idea.
> This can be fixed by a small change (attached) to find_coercion_pathway to add:
> else if (sourceTypeId == UNKNOWNOID)
> result = COERCION_PATH_COERCEVIAIO;
This is not a good idea, I think. I definitely don't accept any reasoning
that starts from the premise that UNKNOWN is a first-class type.
regards, tom lane