Skip to content

jsonpath is not supported #635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
toxadx opened this issue Oct 13, 2020 · 1 comment · Fixed by #665
Closed

jsonpath is not supported #635

toxadx opened this issue Oct 13, 2020 · 1 comment · Fixed by #665

Comments

@toxadx
Copy link

toxadx commented Oct 13, 2020

  • asyncpg version: 0.21.0
  • PostgreSQL version: 12.2
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : no
  • Python version: 3.7.9
  • Platform: OpenBSD
  • Do you use pgbouncer?: no
  • Did you install asyncpg with pip?: with poetry
  • If you built asyncpg locally, which version of Cython did you use?:
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : uvloop is used

Quering jsonb_path_query with jsonpath raises NotImplementedError:
unhandled standard data type 'jsonpath' (OID 4072)

Here is original query:

SELECT jsonb_path_query(data, :jsonpath) FROM reference_data WHERE reference_id=:id LIMIT 20

jsonpath is a string.

@toxadx
Copy link
Author

toxadx commented Nov 26, 2020

Сan be fixed in application code by setting 'str' codec for jsonpath.

await conn.set_type_codec(
    'jsonpath',
    encoder=str,
    decoder=str,
    schema='pg_catalog',
    format='text',
)

elprans added a commit that referenced this issue Nov 27, 2020
The last round of support for esoteric builtin types was quite a while
ago, so catch up.  Out of non-internal types this adds support for the
new `jsonpath` type.

Fixes: #635.
elprans added a commit that referenced this issue Nov 27, 2020
The last round of support for esoteric builtin types was quite a while
ago, so catch up.  Out of non-internal types this adds support for the
new `jsonpath` type.

Fixes: #635.
elprans added a commit that referenced this issue Nov 29, 2020
The last round of support for esoteric builtin types was quite a while
ago, so catch up.  Out of non-internal types this adds support for the
new `jsonpath` type.

Fixes: #635.
elprans added a commit that referenced this issue Dec 2, 2020
The last round of support for esoteric builtin types was quite a while
ago, so catch up.  Out of non-internal types this adds support for the
new `jsonpath` type.

Fixes: #635.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant