[postgres] in 6.1.4 sometimes drop statements fail on "syntax error"
See original GitHub issueSystem information:
- Operating system (distribution) and version: mac os
- DBeaver version: 6.1.4
Connection specification:
- Database name and version : postgres 11.2
- Driver name : default
- Do you use tunnels or proxies (SSH, SOCKS, etc)? not relevant
Describe the problem you’re observing:
It appears that sometimes drop statement fail on syntax error because for some reason DBeaver wraps the drop in a select - see image below:
This never occurred in previous versions (pre-6.1.4).
Steps to reproduce, if exist:
Include any warning/errors/backtraces from the logs
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [42601]: ERROR: syntax error at or near "database_privs"
Position: 31
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:134)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:467)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:407)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:146)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:405)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:849)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2776)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:98)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:146)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:96)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$17.run(ResultSetViewer.java:3271)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "database_privs"
Position: 31
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:338)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Postgres drop table syntax error - sql - Stack Overflow
User is a reserved keyword in Postgres. You'll have to put it in quotes if you want to refer to an actual table...
Read more >ERROR: syntax error at or near "END" [closed]
I thought it has to be with schema since you can see below the the table has a schema name of public so...
Read more >Release Notes for Flyway Engine - Documentation
Bug fixes. Issue 2537 Unexpected error re. non-empty schemas; Issue 2539 HSQLDB: Unable to parse DROP INDEX IF EXISTS statement; Issue 2542 MS ......
Read more >Postgres Release Notes - All Versions - Bucardo
If a syntax error occurred in a SQL-language or PL/pgSQL-language CREATE ... The checkpoint forced by DROP TABLESPACE could sometimes fail to remove...
Read more >20.8. Error Reporting and Logging - PostgreSQL
This approach is often more useful than logging to syslog, ... To effectively turn off logging of failing statements, set this parameter to...
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
@lrweck thanks, yes, it is a different problem than @pyrocks reported Could you create a separate ticket about VACUUM problems?
Getting the same thing from VACUUM and ANALYZE commands: