sgon00
sgon00

Reputation: 5777

Will it make a difference if I use non-ASCII chars as ENUM values in PostgreSQL?

I think most people will use alphabet chars (English) as ENUM values in PostgreSQL. What about using Asian chars (Japanese, Chinese, Korean)? Will that make a different on performance or other perspective? Is that recommended or not?

Upvotes: 0

Views: 251

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246383

It shouldn't make a difference, as these strings are only ever compared for equality, which is independent from the encoding. Under the hood, they are double precision.

The more important consideration when using enums is that they are only suitable if the values don't ever change. For example, you cannot remove an enum value.

Upvotes: 1

Related Questions