PostgreSQL Unit Testing Suite
col_type_is
on Postgres 17 thanks to the introduction of the to_regtypemod()
function.col_type_is
throws an error when the type isn't in the search path. Thanks to Erik Wienhold for the PR (#332)!col_type_is()
to always accurately normalize data type representations, whether using aliases, such as varchar
for character varying
, or more complicated types that failed to work in v1.3.0, such as interval second(0)
. This is done by delegating the parsing of the type declaration to a core PostgresSQL function. Many thanks to Erik Wienhold for the report and for ultimately uncovering and implementing an SQL interface to the parseTypeString()
core function (#315).pg_typeof()
, which was removed from pgTAP when support for PostgreSQL 8.3 was dropped, since the same function has been available in the PostgreSQL core since then.has_cast()
hasnt_cast()
cast_context_is()
domain_type_is()
domain_type_isnt()
has_operator()
hasnt_operator()
has_pk( :schema, :table )
variant, which requires that :table
be cast to name
to avoid confusion with the has_pk( :schema, :description )
variant. Thanks to Adrian Klaver for the report (#287)!pg_prove
, but will break tests
that depend on diffing files, as pg_regress
does. Thanks to Matt DeLuco for
highlighting the visual confusion of the indented diagnostic (#264).col_is_pk()
with schema and without description (variants
without schema or description already existed). Thanks to Luca Ferrari and
Matteo Ferrando for the PRs (#178 & #199)!fk_ok()
documentation, as
well as a test to ensure the suggested expressions work. Thanks to Jim Nasby
for highlighting the special treatment of the temporary schema (#109).DROP
statements from the 1.2.0 upgrade script that
prevented upgrades from working properly. Thanks to @robins for the PR
(#300)!LIKE
expression in schemas_are()
to escape the underscore wildcard,
making it pg\_%
instead of pg_%
. Thanks to Jehan-Guillaume (ioguix) de
Rorthais for the PR (#311)!int
and bool
rather than integer
and boolean
. The return value argument to function_returns
and and data
type tests such as col_type_is
and cast_context_is
must still use full
type names. Thanks to @wphilips53 for the suggestion (#292).int
and
bool
rather than integer
and boolean
. Thanks to @wphilips53 for the
suggestion (#292).has_view()
and hasnt_view()
when
specifying schema (#230). Thanks to Godwottery for the patch!CURRENT_DATE
, CURRENT_TIME
,
CURRENT_TIMESTAMP
, LOCALTIME
, and LOCALTIMESTAMP
to col_default_is()
.
Thanks to Kevin Brannen for the report (#244)!has_index()
or is_indexed()
,
sadly unlike other column arguments in pgTAP. Thanks to Keith Fiske for
the report (#247).col_not_null()
drop statements in the uninstall script. Thanks
to Kyle L. Jensen for the report (#252).isnt_member_of()
(#38, #204). Thanks to Wolfgang Walther for the
pull request (#249).hasnt_operator()
, hasnt_leftop()
, hasnt_rightop()
(#38). Thanks to
Wolfgang Walther for the pull request (#251).results_eq()
and results_ne()
when the number of
columns or their types are different (#37). Thanks to Wolfgang Walther for
the pull request (#255).