Cast between named row types

A named row type is strongly typed, which means that the database server recognizes two named row types as two separate types even if the row types are structurally equivalent. For this reason you must create and register a user-defined cast before you can perform comparisons between two named row types. For an example of how to create and use casts to handle conversions between two named row types, see An example of casting between named row types.