"Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> What about having the calling code fill in the io type oid in an extra field
> in the flinfo?
I don't think that's workable; for one thing there's the problem of
manual invocation of the I/O functions, which is not going to provide
any such special hack. It also turns the enum proposal into a seriously
invasive patch (hitting all PLs both inside and outside the core, for
instance), at which point you'll start encountering some significant
push-back.
BTW, you might want to think about what'd be involved in supporting
arrays and domains over enums ...
regards, tom lane