I guess you can also get this before writing code from
select typbyval from pg_type where typname='mytype'
...thanks again.