On Tue, 2002-07-16 at 11:13, Tom Lane wrote:
> Hannu Krosing <hannu@tm.ee> writes:
> >> We can always re-add the columns them.
>
> > But would it not be nice if we could add uniform binary protocol without
> > requiring initdb ?
>
> That won't happen, because the existing contents of those columns are
> completely useless for a binary-protocol feature.
>
> If we do ever add such a feature, we'd be better off adding new columns
> with a different name, just to avoid confusion over what's supposed to
> be there. (For example: extant pg_dump scripts for user-defined types
> will try to load wrong values into those columns if given a chance.
So you know some place that actually uses the values from these columns
?
Or is it just that we have told users long enough to make them same as
typinput/typoutput ?
> We *must* use new names for those slots in CREATE TYPE to avoid that
> pitfall, and so we might as well change the system column name too.)
Can't we just add a warning when typinput==typreceive or
typoutput==typsend, or just plain refuse to make them equal and force
people to create another function binding even if they are.
The interim solution would be to set typreceive/typsend to NULL if they
are the same as typinput/typoutput in CREATE TYPE.
-------------------
Hannu