FeatureFuel
3

JSONB and GIN support for PostgreSQL

Source: directus/directus#24138 · opened by @Zyles
Summary

When creating a JSON field it creates a JSON field instead of a JSONB and there seems to be no option to select a JSONB for PostgreSQL from what I found in the dashboard.

When trying to apply an index in the interface I also get this error:


![image](


Basic Example

_No response_

Motivation

JSONB is more performant and takes less space on disk.

Btree is not supported on JSONB format. You need to use GIN indexes instead.

Detailed Design

When using PostgreSQL you generally want to store data in JSONB format for faster operations and index it with GIN index.

Here is a good read:

Requirements List

Must Have:

• JSONB support
• GIN index support

Drawbacks

Only supported on PostgreSQL (afaik).

Alternatives

None.

Adoption Strategy

This will allow greated flexibilty when using PostgreSQL as the database. It is a new field type so it should not be a breaking change.

Unresolved Questions

_No response_

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests