You got it backwards. ;-) When storing UTF-8 characters in a VARCHAR(255), you may not be able to store 255 characters
That's curious. In sql server 2000 it's indeed the byte length, in postgres it's character length. And I just tried it in postgres, I can indeed store 64 characters with codepoints above 127 in a varchar(64) column (encoding is set to UTF-8).wikipedia says "characters"
Is there any normative source that is explicit about what's "correct"?
The size is the byte length. And 255 takes a single byte to store the length, anything above takes 2 bytes.
My real question was: do current RDBMs actually exploit that use only one byte to store the length?
In reply to Re^2: [OT] Database row width and cargo cult programming
by moritz
in thread [OT] Database row width and cargo cult programming
by moritz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |