pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow non-quoted identifiers as isolation test session/step name
Date: Wed, 23 Jun 2021 22:42:14 +0000
Message-ID: <E1lwBZW-0004lz-Ah@gemulon.postgresql.org> (raw)

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/94d8d8d89fe8e2fc4109a6c379cfdbd5025f4da7

Modified Files
--------------
contrib/test_decoding/specs/oldest_xmin.spec       |    2 +-
src/test/isolation/README                          |   22 +-
src/test/isolation/specparse.y                     |   14 +-
src/test/isolation/specs/aborted-keyrevoke.spec    |   46 +-
src/test/isolation/specs/alter-table-1.spec        |  298 +-
src/test/isolation/specs/alter-table-2.spec        |  118 +-
src/test/isolation/specs/alter-table-3.spec        |  116 +-
src/test/isolation/specs/alter-table-4.spec        |   26 +-
src/test/isolation/specs/async-notify.spec         |   56 +-
src/test/isolation/specs/classroom-scheduling.spec |   16 +-
src/test/isolation/specs/create-trigger.spec       |   68 +-
src/test/isolation/specs/deadlock-hard.spec        |   66 +-
src/test/isolation/specs/deadlock-simple.spec      |   18 +-
src/test/isolation/specs/deadlock-soft-2.spec      |   30 +-
src/test/isolation/specs/deadlock-soft.spec        |   30 +-
.../isolation/specs/delete-abort-savept-2.spec     |   28 +-
src/test/isolation/specs/delete-abort-savept.spec  |   32 +-
.../isolation/specs/drop-index-concurrently-1.spec |   36 +-
.../isolation/specs/eval-plan-qual-trigger.spec    |  420 +--
src/test/isolation/specs/eval-plan-qual.spec       |  102 +-
src/test/isolation/specs/fk-contention.spec        |   10 +-
src/test/isolation/specs/fk-deadlock.spec          |   44 +-
src/test/isolation/specs/fk-deadlock2.spec         |   38 +-
src/test/isolation/specs/freeze-the-dead.spec      |   48 +-
src/test/isolation/specs/index-only-scan.spec      |   12 +-
src/test/isolation/specs/inherit-temp.spec         |   56 +-
.../specs/insert-conflict-do-nothing-2.spec        |   38 +-
.../specs/insert-conflict-do-nothing.spec          |   20 +-
.../specs/insert-conflict-do-update-2.spec         |   20 +-
.../specs/insert-conflict-do-update-3.spec         |   16 +-
.../isolation/specs/insert-conflict-do-update.spec |   20 +-
.../specs/insert-conflict-specconflict.spec        |  110 +-
.../isolation/specs/insert-conflict-toast.spec     |   14 +-
.../isolation/specs/lock-committed-keyupdate.spec  |   74 +-
.../isolation/specs/lock-committed-update.spec     |   84 +-
src/test/isolation/specs/lock-update-delete.spec   |   46 +-
.../isolation/specs/lock-update-traversal.spec     |   30 +-
src/test/isolation/specs/multiple-cic.spec         |   12 +-
.../isolation/specs/multiple-row-versions.spec     |   32 +-
.../isolation/specs/multixact-no-deadlock.spec     |   24 +-
src/test/isolation/specs/multixact-no-forget.spec  |   46 +-
src/test/isolation/specs/nowait-2.spec             |   20 +-
src/test/isolation/specs/nowait-3.spec             |   20 +-
src/test/isolation/specs/nowait-4.spec             |   22 +-
src/test/isolation/specs/nowait-5.spec             |   20 +-
src/test/isolation/specs/nowait.spec               |   12 +-
src/test/isolation/specs/partial-index.spec        |   16 +-
.../isolation/specs/partition-key-update-1.spec    |   52 +-
.../isolation/specs/partition-key-update-2.spec    |   24 +-
.../isolation/specs/partition-key-update-3.spec    |   44 +-
.../isolation/specs/partition-key-update-4.spec    |   38 +-
src/test/isolation/specs/plpgsql-toast.spec        |   34 +-
src/test/isolation/specs/predicate-gin.spec        |   94 +-
src/test/isolation/specs/predicate-gist.spec       |  104 +-
src/test/isolation/specs/predicate-hash.spec       |  104 +-
.../isolation/specs/predicate-lock-hot-tuple.spec  |   22 +-
.../isolation/specs/prepared-transactions-cic.spec |   16 +-
.../isolation/specs/prepared-transactions.spec     | 2894 ++++++++++----------
src/test/isolation/specs/project-manager.spec      |   16 +-
.../isolation/specs/propagate-lock-delete.spec     |   46 +-
src/test/isolation/specs/read-only-anomaly-2.spec  |   28 +-
src/test/isolation/specs/read-only-anomaly-3.spec  |   26 +-
src/test/isolation/specs/read-only-anomaly.spec    |   26 +-
src/test/isolation/specs/read-write-unique-2.spec  |   20 +-
src/test/isolation/specs/read-write-unique-3.spec  |   14 +-
src/test/isolation/specs/read-write-unique-4.spec  |   22 +-
src/test/isolation/specs/read-write-unique.spec    |   20 +-
src/test/isolation/specs/receipt-report.spec       |   20 +-
.../isolation/specs/referential-integrity.spec     |   18 +-
src/test/isolation/specs/ri-trigger.spec           |   14 +-
src/test/isolation/specs/sequence-ddl.spec         |   28 +-
src/test/isolation/specs/simple-write-skew.spec    |   12 +-
src/test/isolation/specs/skip-locked-2.spec        |   20 +-
src/test/isolation/specs/skip-locked-3.spec        |   20 +-
src/test/isolation/specs/skip-locked-4.spec        |   22 +-
src/test/isolation/specs/skip-locked.spec          |   16 +-
.../isolation/specs/temporal-range-integrity.spec  |   16 +-
src/test/isolation/specs/timeouts.spec             |   36 +-
src/test/isolation/specs/total-cash.spec           |   16 +-
src/test/isolation/specs/tuplelock-conflict.spec   |   90 +-
src/test/isolation/specs/tuplelock-partition.spec  |   18 +-
src/test/isolation/specs/tuplelock-update.spec     |   32 +-
.../specs/tuplelock-upgrade-no-deadlock.spec       |   78 +-
src/test/isolation/specs/two-ids.spec              |   18 +-
src/test/isolation/specs/update-conflict-out.spec  |   52 +-
src/test/isolation/specs/update-locked-tuple.spec  |   30 +-
.../isolation/specs/vacuum-concurrent-drop.spec    |   32 +-
src/test/isolation/specs/vacuum-reltuples.spec     |   22 +-
src/test/isolation/specscanner.l                   |   54 +-
89 files changed, 3391 insertions(+), 3365 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1lwBZW-0004lz-Ah@gemulon.postgresql.org>
Permalink:  ../E1lwBZW-0004lz-Ah@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lwBZW-0004lz-Ah@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Allow non-quoted identifiers as isolation test session/step name
  In-Reply-To: <E1lwBZW-0004lz-Ah@gemulon.postgresql.org>
  References: <E1lwBZW-0004lz-Ah@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox