Menu

#267 "Copy As INSERT and UPDATE" do not support UUID Primary Keys

v0.9.4
open
nobody
UUID (1)
1
2016-12-29
2016-12-29
Anonymous
No

If a table has a UUID as a primary key, then the "Copy as INSERT statements" and "Copy as UPDATE statements" do not work, nor does manual data editing directly in the data results (presumably for the same reason).

-- Example table:

CREATE TABLE GUID_DEMO
(
ID char(16) CHARACTER SET OCTETS NOT NULL,
SOMECOLUMN1 integer,
SOMECOLUMN2 varchar(25),
PRIMARY KEY (ID)
);

-- Insert records

INSERT INTO GUID_DEMO (ID, SOMECOLUMN1, SOMECOLUMN2)
SELECT GEN_UUID(), 1, 'Something' FROM RDB$DATABASE;
INSERT INTO GUID_DEMO (ID, SOMECOLUMN1, SOMECOLUMN2)
SELECT GEN_UUID(), 2, 'Something Else' FROM RDB$DATABASE;

-- Display records

SELECT * FROM GUID_DEMO;

Discussion

MongoDB Logo MongoDB