Have a table with about 500,000 rows. One of the columns is a string field.
Is there a way to get the set of all existing values of that string in PostgreSQL without having to request each row out of the database and add the values to a set manually?
Example:
first_name last_name will i.am will smith britney spears
The set of all existing values for “first_name” would be ['will', 'britney'].
or