Curt Sampson <cjs@cynic.net> writes:
> So currently the only way to specify a row type is by using a table,
No, as of 7.3 there's CREATE TYPE foo AS (column list). But ...
> This is returning a row that (to my mind) doesn't match the type of the
> table above, because it's returning null for non-nullable columns:
The current behavior of a rowtype doesn't include any constraint checks.
Feel free to design a solution ...
regards, tom lane