Opened 6 years ago
Closed 6 years ago
#30615 closed New feature (wontfix)
Add row_to_json(row) postgresql function.
| Reported by: | Julián Perelli | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.postgres | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Add row_to_json(row) postgresql function, reference here: https://www.postgresql.org/docs/11/functions-json.html
see here for a simple implementation that also adds useful Table() Expression
I spent a lot of time trying to solve how to send an aliased table as an argument to a function (row_to_json). I think it will be super useful for a lot of people handling json documents in postgresql, the most difficult part was understanding the Table() Expression
Change History (2)
comment:1 by , 6 years ago
| Component: | Database layer (models, ORM) → contrib.postgres |
|---|---|
| Summary: | Add row_to_json(row) postgresql function → Add row_to_json(row) postgresql function. |
| Version: | 2.2 → master |
comment:2 by , 6 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I think you can achieve the same by serializing instances to JSON format serialization-formats-json, e.g.