Three proposals from the ejabberd mailing list thread 'Database schema's, can they get a little love?', by Snacktime:
1. A column name of 'type' is a reserved word in postgresql (among other databases).
2. A space as a default value for 'type', which is required for the roster entry to work is pretty bad. It's impossible to see in most sql clients, you can't tell if it's a space or an empty string, and it makes it really difficult to figure out what values need to go where.
3. Document what values worked for rosterusers table.