Обсуждение: ERROR: CREATE DATABASE cannot be executed within a pipeline
Exception in thread "main" org.postgresql.util.PSQLException: ERROR: CREATE DATABASE cannot be executed within a pipeline
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:167)
at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:156)
at test.jdbc.pg.TestPipeline.main(TestPipeline.java:39)-----------------------------------------------------------------------------------
"=?gb18030?B?Mzk2OTM0NDA2?=" <396934406@qq.com> writes:
> When executing DROP DATABASE or CREATE DATABASE statements in JDBC,
> other statements cannot be included
This restriction is intentional. Previous versions failed to enforce it
fully, but you were at serious hazard of problems, up to and including
database corruption, if you exploited the missing check.
regards, tom lane