Execute a ``psql`` command inside a running container. By default the
        container's database is connected to.

        :param command: the command to run (passed to ``-c``)
        :param psql_opts: a list of extra options to pass to ``psql``
        :returns: a tuple of the command exit code and output

def exec_psql(self, command, psql_opts=['-qtA']):
        """
        Execute a ``psql`` command inside a running container. By default the
        container's database is connected to.

        :param command: the command to run (passed to ``-c``)
        :param psql_opts: a list of extra options to pass to ``psql``
        :returns: a tuple of the command exit code and output
        """
        cmd = ['psql'] + psql_opts + [
            '--dbname', self.database,
            '-U', self.user,
            '-c', command,
        ]
        return self.inner().exec_run(cmd, user='postgres')