update DSN bits dynamically

track calls to the DATABASE command and update our concept of your
current db so that reconnection and tablename completion both respect it