Does domain in text data type is stored as text in a table? (PostgreSQL)

113 Views Asked by At

Because there is no set type in PostgreSQL I had to use domain. I have named a domain gender. It is text type. Then in users table I have created a column with that gender type. Now, how is stored the gender in the users table? As text or binary?

1

There are 1 best solutions below

0
On BEST ANSWER

Domain type is based on some basic "buildin" type always. This type specifies a binary format. So if your domain is based on "text" type, then you store data as text.