[PostgreSQL] Rename sequence is missing schema qualification
See original GitHub issueSystem information:
- OS: Ubuntu 18.04 64bit
- Java: OpenJDK 11.0.4
- DBeaver: 6.3.0.201912011827
- Additional extensions: No
Connection specification:
- DB: PostgreSQL 9.4.7
- Driver: PostgreSQL JDBC Driver
- Do you use tunnels or proxies (SSH, SOCKS, etc)? No
Describe the problem you’re observing:
When renaming a sequence either through the context menu or through the properties pane, the generated DDL is missing the schema.
This is different from the fixed “Unable to rename sequence in Postgresql” #5902 because it was using the new name for the source name.
Steps to reproduce, if exist:
Create a schema and sequence:
CREATE SCHEMA test_schema;
CREATE SEQUENCE test_schema.test_seq;
Open the sequence’s properties pane, change its name to “test_seqqq”, click “Save”, and the Persist Changes dialog box will have the following DDL:
ALTER SEQUENCE test_seq RENAME TO test_seqqq;
This SQL statement is missing the schema qualification. It should be:
ALTER SEQUENCE test_schema.test_seq RENAME TO test_seqqq;
Include any warning/errors/backtraces from the logs
When trying to persist the incorrect DDL the following error details is displayed:
SQL Error [42P01]: ERROR: relation "test_seq" does not exist
ERROR: relation "test_seq" does not exist
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Documentation: 15: ALTER SEQUENCE - PostgreSQL
ALTER SEQUENCE conforms to the SQL standard, except for the AS , START WITH , OWNED BY , OWNER TO , RENAME TO...
Read more >Documentation: 15: CREATE SEQUENCE - PostgreSQL
CREATE SEQUENCE creates a new sequence number generator. ... The name (optionally schema-qualified) of the sequence to be created. data_type.
Read more >Documentation: 9.6: ALTER TABLE - PostgreSQL
The name (optionally schema-qualified) of an existing table to alter. If ONLY is specified before the table name, only that table is altered....
Read more >Documentation: 15: ALTER EXTENSION - PostgreSQL
The data type(s) of the operator's arguments (optionally schema-qualified). Write NONE for the missing argument of a prefix operator. PROCEDURAL. This is a ......
Read more >Sequence does not exist when it does - Postgres/Spring Boot
It mean your sequence either not exist in database OR the user doesn't has permission to access it. Solution: Check user_id_seq in database...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I observed the same behaviour for the RENAME VIEW statement. Returned error is “Object … does not exist”. When adding schema name manually in generated SQL it is possible to execute the statement successfully. Dbeaver 2.6.5 community/Windows. Jdbc/Exasol DB.
verified