def insert(obj, id=None):
    """Insert an object into PostGreSQL.

        The correct collection is determined by object type.

        If `id` is provided, object will be inserted under that id. Otherwise,
        a new unique id will be generated.
        """
