简体   繁体   English

无法识别HSQL postgres对话框

[英]HSQL postgres dialog not recognized

I want to use HSQL for integration tests. 我想使用HSQL进行集成测试。 Therefore I want to setup the test schema with exact the same script I use for production. 因此,我想使用与生产中使用的脚本完全相同的脚本来设置测试架构。 This is in postgresql dialect. 这是在PostgreSQL方言中。 In the test script I tried to set the dialect but it doesn't seem to work. 在测试脚本中,我尝试设置方言,但似乎不起作用。

At least for uuid datatype and constraints I get syntax error exceptions. 至少对于uuid数据类型和约束,我得到语法错误异常。 Eg I get a: 例如,我得到:

CREATE TABLE testtable ( id bigint NOT NULL, some_uuid uuid NOT NULL, name character varying(32) NOT NULL, CONSTRAINT testtable PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); CREATE TABLE testtable(id bigint NOT NULL,some_uuid uuid NOT NULL,名称字符不可变(32)NOT NULL,CONSTRAINT testtable PRIMARY KEY(id))WITH(OIDS = FALSE); nested exception is java.sql.SQLSyntaxErrorException: type not found or user lacks privilege: UUID 嵌套异常为java.sql.SQLSyntaxErrorException:找不到类型或用户缺少特权:UUID

for the following script: 对于以下脚本:

SET DATABASE SQL SYNTAX PGS TRUE;

CREATE TABLE testtable
(
  id bigint NOT NULL,
  some_uuid uuid NOT NULL,
  name character varying(32) NOT NULL,
  CONSTRAINT testtable PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);

And I get: 我得到:

Failed to execute SQL script statement #2 of class path resource [setupTestData.sql]: CREATE TABLE testtable ( id bigint NOT NULL, name character varying(32) NOT NULL, CONSTRAINT testtable PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); 无法执行类路径资源[setupTestData.sql]的SQL脚本语句#2:CREATE TABLE测试表(id bigint NOT NULL,名称字符变化(32)NOT NULL,CONSTRAINT testtable主键(id))WITH(OIDS = FALSE) ; nested exception is java.sql.SQLSyntaxErrorException: unexpected token: ( 嵌套异常是java.sql.SQLSyntaxErrorException:意外令牌:(

for this script: 对于此脚本:

SET DATABASE SQL SYNTAX PGS TRUE;

CREATE TABLE testtable
(
  id bigint NOT NULL,
  --some_uuid uuid NOT NULL,
  name character varying(32) NOT NULL,
  CONSTRAINT testtable PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);

HSQLDB 2.3.4 and later supports UUID. HSQLDB 2.3.4和更高版本支持UUID。

HSQLDB does not currently support the PostgreSQL extension WITH (ODS= FALSE) HSQLDB当前不支持PostgreSQL扩展WITH (ODS= FALSE)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从HSQL DB 1.8迁移到2.x内存问题 - Migrating From HSQL DB 1.8 to 2.x memory issue 我的Spring集成测试如何根据HSQL数据库中的模型创建自己的模式? - How can my Spring integration tests create their own schema based on the model in a HSQL database? 如何进行集成测试setUp()操作在嵌入式Jetty容器中运行的内存数据库中的HSQL数据? - How to have integration tests setUp() manipulate HSQL data in an in-memory DB running in embedded Jetty container? java.lang.IllegalStateException:使用HSQL嵌入式数据库运行单元测试时,无法加载ApplicationContext - java.lang.IllegalStateException: Failed to load ApplicationContext when running unit test with HSQL embedded database 序列未重设模拟HSQL db并导致JBehave测试之间的约束冲突 - Sequences not resetting for mock HSQL db and causing constraint violation between JBehave tests 如何使用Liquibase来改变Oracle和HSQL DB上的视图,(HSQLDB不支持replaceIfExists) - How to use Liquibase to alter views on both Oracle and HSQL DBs, (replaceIfExists not supported on HSQLDB) KIF无法识别“ALAssetsLibrary”访问请求警报视图的标签 - Labels of the 'ALAssetsLibrary' access request alert view aren't recognized by KIF 如何使用Cucumber测试确认对话框? - How to test a confirm dialog with Cucumber? 在WebdriverIO中确认Chrome导航对话框 - Confirm Chrome navigation dialog in WebdriverIO 使用回滚的Postgres,Npgsql和Integration测试 - Postgres, Npgsql and Integration tests using rollbacks
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM