Don't shorten SQL selections shorter than 10 chars.

Fix #332.