I'm fairly new to PostgreSQL. I'm working with a table that has not had a max-length (character count) enforced in the "title" column. The application needs it to be less than 1000 characters but some fields are at 1200, 1300 etc.
I'm quite familiar with mySql but I'm having a harder time picking up PostgreSQL.
If this was mySql I would so something like:
UPDATE TABLE entries SET title = LEFT(title,1000)
How can I accomplish the same thing with PostgreSQL?
I have phppgadmin and the commmand line at my disposal.
Actually, it's the same in postgresql
UPDATE entries SET title = LEFT(title,1000)
or you can do something like this
UPDATE entries SET title = substring(title from 1 for 1000)
Here's the doc about the string functions in postgresql