Skip to content

Instantly share code, notes, and snippets.

@Eijebong
Created November 16, 2017 21:41
Show Gist options
  • Save Eijebong/046af0311510e84126a1ef37c3c59c0a to your computer and use it in GitHub Desktop.
Save Eijebong/046af0311510e84126a1ef37c3c59c0a to your computer and use it in GitHub Desktop.
[local] eijebong@test_bug=# CREATE DOMAIN sql_identifier AS character varying;
CREATE DOMAIN
[local] eijebong@test_bug=# CREATE TABLE foo(a sql_identifier, b character varying not null);
CREATE TABLE
[local] eijebong@test_bug=# INSERT INTO foo(a, b) VALUES(NULL, NULL);
ERROR: 23502: null value in column "b" violates not-null constraint
DETAIL: Failing row contains (null, null).
SCHEMA NAME: public
TABLE NAME: foo
COLUMN NAME: b
LOCATION: ExecConstraints, execMain.c:2008
[local] eijebong@test_bug=# INSERT INTO foo(a, b) VALUES(NULL, 'a');
INSERT 0 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment