Opened 4 years ago
Closed 4 years ago
#32474 closed Cleanup/optimization (duplicate)
JSONField and register_default_jsonb all json column return as str
Reported by: | Петр Eлагин | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 3.1 |
Severity: | Normal | Keywords: | jsonb |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
when i make select all json field as string
# Register dummy loads() to avoid a round trip from psycopg2's decode
# to json.dumps() to json.loads(), when using a custom decoder in
# JSONField.
psycopg2.extras.register_default_jsonb(conn_or_curs=connection, loads=lambda x: x)
/Users/koshak01/Virtualenvs/virtual3.9/lib/python3.9/site-packages/django/db/backends/postgresql/base.py:206
i make raw select request w/o ORM
Change History (1)
comment:1 by , 4 years ago
Component: | contrib.postgres → Database layer (models, ORM) |
---|---|
Owner: | set to |
Resolution: | → duplicate |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Duplicate of #31991.