{"action":"opened","issue":{"url":"https://api.github.com/repos/cmu-db/peloton/issues/849","repository_url":"https://api.github.com/repos/cmu-db/peloton","labels_url":"https://api.github.com/repos/cmu-db/peloton/issues/849/labels{/name}","comments_url":"https://api.github.com/repos/cmu-db/peloton/issues/849/comments","events_url":"https://api.github.com/repos/cmu-db/peloton/issues/849/events","html_url":"https://github.com/cmu-db/peloton/issues/849","id":267026356,"number":849,"title":"System does not prevent INSERTS with reserved NULL values for BIGINT columns","user":{"login":"apavlo","id":718045,"avatar_url":"https://avatars2.githubusercontent.com/u/718045?v=4","gravatar_id":"","url":"https://api.github.com/users/apavlo","html_url":"https://github.com/apavlo","followers_url":"https://api.github.com/users/apavlo/followers","following_url":"https://api.github.com/users/apavlo/following{/other_user}","gists_url":"https://api.github.com/users/apavlo/gists{/gist_id}","starred_url":"https://api.github.com/users/apavlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apavlo/subscriptions","organizations_url":"https://api.github.com/users/apavlo/orgs","repos_url":"https://api.github.com/users/apavlo/repos","events_url":"https://api.github.com/users/apavlo/events{/privacy}","received_events_url":"https://api.github.com/users/apavlo/received_events","type":"User","site_admin":false},"labels":[{"id":158835809,"url":"https://api.github.com/repos/cmu-db/peloton/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-20T00:07:54Z","updated_at":"2017-10-20T00:07:54Z","closed_at":null,"author_association":"OWNER","body":"We reserve certain values for the different types to represent NULL values. These are defined in 'limits.h':\r\n\r\nhttps://github.com/cmu-db/peloton/blob/master/src/include/type/limits.h#L42-L50\r\n\r\nI added a new test case that creates a table with each type and then tries to insert a value with the reserved value. The front-end throws a proper error to tell you that you are out of range for most types. It fails on `BIGINT`. It also fails on `DECIMAL` but I think it's an IEEE-754 issue.\r\n\r\n---------\r\n\r\nSteps to recreate:\r\n```\r\npostgres=# \\pset null '[NULL]' \r\nNull display is \"[NULL]\".\r\npostgres=# CREATE TABLE tblBIGINT(id INT PRIMARY KEY, b BIGINT);\r\nCREATE TABLE\r\npostgres=# INSERT INTO tblBIGINT VALUES (1, -9223372036854775808);\r\nINSERT 0 1\r\npostgres=# SELECT * FROM tblBIGINT;\r\n id |   b\r\n----+--------\r\n  1 | [NULL]\r\n(1 row)\r\n```"}}
{"actor":{"display_login":"apavlo"}}