cloudbeaver
cloudbeaver copied to clipboard
Cannot update PostgreSQL updatable view
Describe the bug
A PostgreSQL updatable view cannot be updated. Error message:
Can't detect row identifier for data container 'v_test'. It must have at least one unique key.
To Reproduce Steps to reproduce the behavior: 1.
CREATE SCHEMA test;
CREATE TABLE test.test (
id integer PRIMARY KEY,
value integer NULL
);
CREATE VIEW test.v_test
AS SELECT test.id, test.value
FROM test.test;
INSERT INTO test.v_test (id, value) VALUES(1, NULL);
- Try to change value
Desktop:
- OS: macOS 11.4
- Browser Chrome
- Version 91
Additional context Database: PostgreSQL 13.3
Thank you for the report. We will add this option.
It requires a complicated UI to define virtual unique key.
We have such a feature in the desktop product.
Adminer uses all columns in the where clause. Would that be an option?
Thank you for your idea. A lot of UI changes must be done to implement the feature by the best way. An option to use all columns as a unique key can make work with tables inconvenient in some cases.