Martijn van Oosterhout wrote:
There's also the performance angle. The current mbverify is very inefficient for encodings like UTF-8. You might need to refactor a bit there...
There appears to be a lot of function call overhead in the current implementation. In pg_verify_mbstr, the function pointer pg_wchar_table.mbverify is called for each multibyte character in a multibyte string.
Refactoring the way these table driven functions work would impact lots of other code. Just grep for all files #including mb/pg_wchar.h for the list of them. The list includes interfaces/libpq, and I'm wondering if software that links against postgres might rely on these function prototypes?
mark ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings