Implementation of the type to store Social Security Numbers (SSNs) for
PostgreSQL. Each SSN is normally represented as a nine digit number in a form
AAA-BB-CCCC, where AAA is called the area number, BB - the is the group
number, and CCCC - the serial number.
CREATE TABLE test(ssn ssn PRIMARY KEY);
There are 2 formats accepted by the type:
AAA-BB-CCCC, i.e: INSERT INTO test VALUES('123-45-6789');
AAABBCCCC, i.e. INSERT INTO test VALUES('124659876');
The output is always represented using the format with dashes, i.e:
The type is stored as a 4 bytes integer.