Marthin Laubscher <postg...@lobeshare.co.za> writes:
> But now I need to (re)define MyType to support type modifiers (e.g. 
> MyType(1,14,18)) and I got that done using CREATE TYPE’s TYPMOD_IN and 
> TYPMOD_OUT parameters resulting in the correct packed value getting stored in 
> pg_attribute when I define a column of that type. 

OK ...

> But when I pass a MyType value to a function defined in my C extension how 
> would I access the type modifier value for the argument which could have been 
> drawn from the catalog or the result of a cast. 

You can't.  Whatever info is needed by operations on the type had
better be embedded in the value.

                        regards, tom lane


Reply via email to