2015-04-05 18:03:58 +02:00
|
|
|
# CREATE TRIGGER - Add trigger with concurrent reads
|
|
|
|
#
|
|
|
|
# CREATE TRIGGER uses ShareRowExclusiveLock so we mix writes with it
|
|
|
|
# to see what works or waits.
|
|
|
|
|
|
|
|
setup
|
|
|
|
{
|
|
|
|
CREATE TABLE a (i int);
|
|
|
|
CREATE FUNCTION f() RETURNS TRIGGER LANGUAGE plpgsql AS 'BEGIN RETURN NULL; END;';
|
|
|
|
INSERT INTO a VALUES (0), (1), (2), (3);
|
|
|
|
}
|
|
|
|
|
|
|
|
teardown
|
|
|
|
{
|
|
|
|
DROP TABLE a;
|
|
|
|
DROP FUNCTION f();
|
|
|
|
}
|
|
|
|
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
session s1
|
|
|
|
step s1a { BEGIN; }
|
|
|
|
step s1b { CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); }
|
|
|
|
step s1c { COMMIT; }
|
2015-04-05 18:03:58 +02:00
|
|
|
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
session s2
|
|
|
|
step s2a { BEGIN; }
|
|
|
|
step s2b { SELECT * FROM a WHERE i = 1 FOR UPDATE; }
|
|
|
|
step s2c { UPDATE a SET i = 4 WHERE i = 3; }
|
|
|
|
step s2d { COMMIT; }
|
2016-02-11 14:23:46 +01:00
|
|
|
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
permutation s1a s1b s1c s2a s2b s2c s2d
|
|
|
|
permutation s1a s1b s2a s1c s2b s2c s2d
|
|
|
|
permutation s1a s1b s2a s2b s1c s2c s2d
|
|
|
|
permutation s1a s1b s2a s2b s2c s1c s2d
|
|
|
|
permutation s1a s2a s1b s1c s2b s2c s2d
|
|
|
|
permutation s1a s2a s1b s2b s1c s2c s2d
|
|
|
|
permutation s1a s2a s1b s2b s2c s1c s2d
|
|
|
|
permutation s1a s2a s2b s1b s1c s2c s2d
|
|
|
|
permutation s1a s2a s2b s1b s2c s1c s2d
|
|
|
|
permutation s1a s2a s2b s2c s1b s2d s1c
|
|
|
|
permutation s1a s2a s2b s2c s2d s1b s1c
|
|
|
|
permutation s2a s1a s1b s1c s2b s2c s2d
|
|
|
|
permutation s2a s1a s1b s2b s1c s2c s2d
|
|
|
|
permutation s2a s1a s1b s2b s2c s1c s2d
|
|
|
|
permutation s2a s1a s2b s1b s1c s2c s2d
|
|
|
|
permutation s2a s1a s2b s1b s2c s1c s2d
|
|
|
|
permutation s2a s1a s2b s2c s1b s2d s1c
|
|
|
|
permutation s2a s1a s2b s2c s2d s1b s1c
|
|
|
|
permutation s2a s2b s1a s1b s1c s2c s2d
|
|
|
|
permutation s2a s2b s1a s1b s2c s1c s2d
|
|
|
|
permutation s2a s2b s1a s2c s1b s2d s1c
|
|
|
|
permutation s2a s2b s1a s2c s2d s1b s1c
|
|
|
|
permutation s2a s2b s2c s1a s1b s2d s1c
|
|
|
|
permutation s2a s2b s2c s1a s2d s1b s1c
|
|
|
|
permutation s2a s2b s2c s2d s1a s1b s1c
|