Here is a small patch that allows casting a table's row type to thetable's supertype if it's a typed table. This is analogous to theexisting facility that allows casting a row type to a supertable's rowtype.