需要在没有NOT NULL规定(不是主键)的uuid
类型字段中插入空值。
当我尝试插入''时,会返回:
ERROR: invalid input syntax for uuid: ""
当我尝试插入null时,会返回以下结果:
ERROR: null value in column "uuid" violates not-null constraint
如何操作?
psql 9.3.5
SQL:
INSERT INTO inv_location (address_id)
VALUES (null)
psql
中使用\d tbl
命令获取)。还有您正在使用的逐字逐句的INSERT
命令。并且始终提供您的Postgres版本。 - Erwin Brandstetter