We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submitted by: Alexander Tyutik (tut)
I don't know what standart tels about this, but i think this is incorrect behavior.
Here is an example:
CREATE TABLE TEST_TABLE ( FIELD1 INTEGER DEFAULT 1, FIELD2 INTEGER DEFAULT 2 );
CREATE OR ALTER TRIGGER TEST_TABLE_BI0 FOR TEST_TABLE ACTIVE BEFORE INSERT POSITION 0 AS BEGIN EXCEPTION ERROR COALESCE(NEW.FIELD2, '<null>'); END;
CREATE VIEW TEST_VIEW AS SELECT * FROM TEST_TABLE;
CREATE TRIGGER TEST_VIEW_BI0 FOR TEST_VIEW ACTIVE BEFORE INSERT POSITION 0 AS BEGIN EXCEPTION ERROR COALESCE(NEW.FIELD2, '<null>'); END;
Now test queries:
1) INSERT INTO TEST_TABLE (FIELD1) VALUES (3)
------------ ERROR. 2. At trigger 'TEST_TABLE_BI0' line: 5, col: 3.
2) INSERT INTO TEST_TABLE (FIELD1) VALUES (3)
------------ ERROR. <null>. At trigger 'TEST_VIEW_BI0' line: 5, col: 3.
I think that NEW.FIELD2 must contain value "2" for table and for view...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Submitted by: Alexander Tyutik (tut)
I don't know what standart tels about this, but i think this is incorrect behavior.
Here is an example:
CREATE TABLE TEST_TABLE (
FIELD1 INTEGER DEFAULT 1,
FIELD2 INTEGER DEFAULT 2
);
CREATE OR ALTER TRIGGER TEST_TABLE_BI0 FOR TEST_TABLE
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
EXCEPTION ERROR COALESCE(NEW.FIELD2, '<null>');
END;
CREATE VIEW TEST_VIEW AS SELECT * FROM TEST_TABLE;
CREATE TRIGGER TEST_VIEW_BI0 FOR TEST_VIEW
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
EXCEPTION ERROR COALESCE(NEW.FIELD2, '<null>');
END;
Now test queries:
1) INSERT INTO TEST_TABLE (FIELD1) VALUES (3)
------------
ERROR.
2.
At trigger 'TEST_TABLE_BI0' line: 5, col: 3.
2) INSERT INTO TEST_TABLE (FIELD1) VALUES (3)
------------
ERROR.
<null>.
At trigger 'TEST_VIEW_BI0' line: 5, col: 3.
I think that NEW.FIELD2 must contain value "2" for table and for view...
The text was updated successfully, but these errors were encountered: