Tom Lane writes:
> > Do we need to communicate the server encoding during any part of the
> > protocol?
>
> Probably. What if the client needs to know what is the set of
> characters that can actually be stored in the database?
That sort of thing might be interesting to know, but it does not seem to
be part of the protocol.
Anyway, you cannot answer that question reliably by looking at the server
encoding. You need to know which conversion will be invoked and what that
conversion will do, and that is a lot harder to do programmatically.
> I'm also still unconvinced that binary data I/O should perform encoding
> conversion (it does as of CVS tip, but I'm not 100% sold that that's the
> right choice).
That depends on what you intend to achieve with the binary format. For
some of the numeric types it's obvious, but for strings it's not.
> The general mechanism seems necessary in any case, and once we have it,
> applying it to these particular values isn't adding much bloat.
But where does it stop? What's the criterion?
--
Peter Eisentraut peter_e@gmx.net