"Karen Hill" <karen_hill22@xxxxxxxxx> writes: > I did a quick google and someone mentioned that input and output > functions need to be written in C. Is that still the case? Yeah, pretty much. The main problem is that such functions need to deal with whatever physical on-disk format you've chosen for the datatype, and most of our PLs don't offer bit-level memory access. If C functions seem like more work than you want to go to for this problem, I concur with using a domain over text with a regex check constraint ... regards, tom lane