diff --git a/Changes b/Changes index 904826b7915d..38dccd727ab6 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,12 @@ Revision history for pgTAP * Added support for the date and time keywords `CURRENT_DATE`, `CURRENT_TIME`, `CURRENT_TIMESTAMP`, `LOCALTIME`, and `LOCALTIMESTAMP` to `col_default_is()`. Thanks to Kevin Brannen for the report (#244)! +* Fixed failure to run tests on Postgres 13. Thanks to Christoph Berg for the + report (#248). +* Documented that mixed-case column names created with double quotes + must be double-quoted when passed to `has_index()` or `is_indexed()`, + sadly unlike other column arguments in pgTAP. Thanks to Keith Fiske for + the report (#247). 1.1.0 2019-11-25T19:05:38Z -------------------------- diff --git a/doc/pgtap.mmd b/doc/pgtap.mmd index 9d3dc8e99e48..c4cfc67192b5 100644 --- a/doc/pgtap.mmd +++ b/doc/pgtap.mmd @@ -3517,6 +3517,20 @@ incorrect, the diagnostics will look more like this: # have: "idx_baz" ON public.sometab(lower(name)) # want: "idx_baz" ON public.sometab(lower(lname)) +Note that unlike most other column parameter arguments in pgTAP, mixed-case +column mames crated with double-quotes must be double-quoted when passed +to `has_index()`, like so: + + SELECT has_index( + 'myschema', + 'sometable', + 'myindex', + ARRAY[ 'id', '"Name"', 'lower("foo-bar")' ] + ); + +This caveat applies only to column names, not to table and schema names, +which should omit double-quoting. + ### `hasnt_index()` ### SELECT hasnt_index( schema, table, index, description ); @@ -5092,6 +5106,15 @@ index on the named table. Effectively like `has_index()` except that it doesn't require an index name and does require one or more column names or expressions in the defined for the index. +Note that unlike most other column parameter arguments in pgTAP, mixed-case +column mames crated with double-quotes must be double-quoted when passed +to `is_indexed()`, like so: + + SELECT is_indexed( 'widgets', '"Name"' ); + +This caveat applies only to column names, not to table and schema names, +which should omit double-quoting. + ### `index_is_type()` ### SELECT index_is_type( :schema, :table, :index, :type, :description );