Skip to content
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

Add a note about 'NOT NULL' JSONB 'null' #134

Open
benjie opened this issue May 28, 2019 · 0 comments
Open

Add a note about 'NOT NULL' JSONB 'null' #134

benjie opened this issue May 28, 2019 · 0 comments

Comments

@benjie
Copy link
Member

benjie commented May 28, 2019

create table a (
  b jsonb not null default 'null'
);

We expose this as "non-nullable", but it's possible to store a JSON 'null' (rather than an SQL null) in the column. PostGraphile doesn't differentiate these, and trusts you'll do the right thing. Otherwise all JSON/JSONB columns would have to be nullable, and that'd not be a pleasant experience.

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

No branches or pull requests

2 participants
@benjie and others