Skip to content
Browse files

Add note not to include typemod when testing for casts.

Thanks to Nathan Wagner for alerting me to this issue.
  • Loading branch information...
1 parent 082d57c commit 2c7d48ea240f46191845890fa583aaa6e8860719 @theory committed Sep 12, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 doc/pgtap.mmd
13 doc/pgtap.mmd
@@ -3057,10 +3057,10 @@ specified function (optionally with the specified signature) does *not* exist.
-: Data type of the source value.
+: Data type of the source value without typemod.
-: Data type of the target value.
+: Data type of the target value without typemod.
: Schema in which to find the operator function.
@@ -3084,6 +3084,15 @@ resolve the function name as a description. For example:
pgTAP will generate a useful description if you don't provide one.
+Note that pgTAP does not compare typemods. So if you wanted to test for a cast
+between, say, a `uuid` type and `bit(128)`, this will not work:
+ SELECT has_cast( 'integer', 'bit(128)' );
+But this will:
+ SELECT has_cast( 'integer', 'bit' );
### `hasnt_cast()` ###
SELECT hasnt_cast( :source_type, :target_type, :schema, :function, :description );

0 comments on commit 2c7d48e

Please sign in to comment.
Something went wrong with that request. Please try again.