Opened 3 weeks ago

Last modified 11 days ago

#35718 assigned New feature

Some useful postgres functions for JSON are missing from contrib — at Initial Version

Reported by: john-parton Owned by:
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

There's a large number of postgres-specific functions for manipulating json: https://www.postgresql.org/docs/current/functions-json.html

In my projects for work, I have created several:

  • jsonb_build_object
  • jsonb_build_array
  • jsonb_array_elements
  • jsonb_extract_path
  • jsonb_extract_path_text
  • jsonb_array_length

It would be nice if these were included in contrib.postgres.functions, ideally in a submodule like contrib.postgres.function.json to allow room to expand.

I know postgres's json support is a bit of test-bed for more fleshed out json support in general, but I would recommend just adding things as postgres-specific to limit the scope of the changes.

I can open a basic pull request.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top