Peter Eisentraut <peter_e@gmx.net> writes:
> I don't have a set theory text available, but I think this should give a
> fair indication that the number of bits in the value of S is the sum of
> the bits in each individual character (which is in turn vaguely defined
> elsewhere in SQL99) -- at least in Euclidean memory architectures.
But "how many bits in a character?" is exactly the question at this
point. To be fair, I don't think our notion of on-the-fly encoding
translation is envisioned anywhere in the SQL spec, so perhaps we
shouldn't expect it to tell us which encoding to count the bits in.
regards, tom lane