Skip to content

Human readable message on exception in synchronized directory query #28

@cassiopeia92

Description

@cassiopeia92

Hello!
Could you add human readable message on exception in synchronized directory query please?
Now it's impossible to determine which table has problem sql query

$ pg_export --clean -h host -p port "db_name" /Users/user/exp_db/
Task exception was never retrieved
future: <Task finished name='Task-123' coro=<Extractor.dump_directory() done, defined at /opt/homebrew/lib/python3.8/site-packages/pg_export/extractor.py:103> exception=PostgresSyntaxError('syntax error at or near "="')>
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.8/site-packages/pg_export/extractor.py", line 119, in dump_directory
    await con.copy_from_query(query, output=f.write)
  File "/opt/homebrew/lib/python3.8/site-packages/asyncpg/connection.py", line 821, in copy_from_query
    return await self._copy_out(copy_stmt, output, timeout)
  File "/opt/homebrew/lib/python3.8/site-packages/asyncpg/connection.py", line 1049, in _copy_out
    return await self._protocol.copy_out(copy_stmt, writer, timeout)
  File "asyncpg/protocol/protocol.pyx", line 363, in copy_out
  File "asyncpg/protocol/protocol.pyx", line 364, in asyncpg.protocol.protocol.BaseProtocol.copy_out
asyncpg.exceptions.PostgresSyntaxError: syntax error at or near "="

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions