Mark Volpe <volpe(dot)mark(at)epamail(dot)epa(dot)gov> writes:
> someone give me a hint, or point me to the appropriate material on how to get
> "value::text" to work with my new type?
Write a function "text(yourtype) RETURNS text", and the parser will use
it for type coercions from yourtype to text. In general any type
coercion can be provided this way --- a function of a single argument,
having the same name as its return type, represents a coercion path.
regards, tom lane