0

I want all of the entries in my relation to be lower case.

I tried

ALTER TABLE tableName SET (columnName = lower(columnName)); 

but it didn't seem to work. Could someone point me in the right direction?

1
  • 1
    If you always want to treat your data case-insensitive, consider the data type citext, provided by the additional module of the same name. More details. Commented Mar 14, 2014 at 2:35

1 Answer 1

2
UPDATE TABLE tableName SET columnName = lower(columnName); 

Should work better :)

Edit:

The data you insert is up to you to insert lowercase, it wont be changed. If you need to do that, you can do it in a trigger or rule.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.