提交 66427536 authored 作者: Noel Grandin's avatar Noel Grandin

#1041: Support OR syntax while creating trigger

上级 7bfcb317
......@@ -21,6 +21,8 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul>
<li>Issue #1041: Support OR syntax while creating trigger
</li>
<li>Issue #1003: Decrypting database with incorrect password renders the database corrupt
</li>
<li>Issue #873: No error when `=` in equal condition when column is not of array type
......
......@@ -5082,7 +5082,9 @@ public class Parser {
} else {
throw getSyntaxError();
}
} while (readIf(","));
} while (readIf(",")
|| (database.getMode().getEnum() == ModeEnum.PostgreSQL
&& readIf("OR")));
read("ON");
String tableName = readIdentifierWithSchema();
checkSchema(schema);
......
......@@ -30,3 +30,24 @@ insert into items values(DEFAULT);
drop table items, count;
> ok
-- ---------------------------------------------------------------------------
-- PostgreSQL syntax tests
-- ---------------------------------------------------------------------------
set mode postgesql;
> ok
CREATE TABLE COUNT(X INT);
> ok
INSERT INTO COUNT VALUES(1);
> ok
CREATE FORCE TRIGGER T_COUNT BEFORE INSERT OR UPDATE ON COUNT CALL "com.Unknown";
> ok
INSERT INTO COUNT VALUES(NULL);
> exception
UPDATE COUNT SET X=2 WHERE X=1;
> exception
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论