I am using psql to alter a database table. Currently running the following alter-statement:
ALTER TABLE "devices" ADD "device_id" VARCHAR(255) NULL DEFAULT NULL;
but I end up with the following in the create-table-statement:
"device_id" VARCHAR(255) NULL DEFAULT 'NULL::character varying'
Why is the default set to 'NULL::character varying'
?
I am bit confused, since the table already have multiple varchar fields, where the default is correct.. ex from CREATE-statement:
"external_id" VARCHAR(50) NULL DEFAULT NULL,
FYI: This column, external_id
, was created multiple years ago before I started to touch the table.