Datatype for phone numbers in postgresql
18,856
I recommend to use text
and add a check constraint that tests the phone number for validity.
This is a good use case for domains. Particularly if you need such a column in several places, it is convenient to have a domain that includes the check constraint.
Author by
joedenly
Updated on June 29, 2022Comments
-
joedenly almost 2 years
I am new to postgresql so can anyone tell me that is there any specific datatype to store phone numbers in postgresql while creating table in pgadmin or is it just string?