register_composite now takes a connection rather than a cursor