Convert stressed characters to PostgreSQL?

Is there an existing function to replace accented characters with unembellished characters in PostgreSQL? Symbols of type Γ₯ and ΓΈ must become a and o respectively.

The closest thing I could find is the translation function given in the comments section found here .

Some commonly used accented characters can be searched using the following function:

translates (SEARCH_TERMS, "\ 303 \ 200 \ 303 \ 201 \ 303 \ 202 \ 303 \ 203 \ 303 \ 204 \ 303 \ 205 \ 303 \ 206 \ 303 \ 207 \ 303 \ 210 \ 303 \ 211 \ 303 \ 212 \ 303 \ 213 \ 303 \ 214 \ 303 \ 215 \ 303 \ 216 \ 303 \ 217 \ 303 \ 221 \ 303 \ 222 \ 303 \ 223 \ 303 \ 224 \ 303 \ 225 \ 303 \ 226 \ 303 \ 230 \ 303 \ 231 \ 303 \ 232 \ 303 \ 233 \ 303 \ 234 \ 303 \ 235 \ 303 \ 237 \ 303 \ 240 \ 303 \ 241 \ 303 \ 242 \ 303 \ 243 \ 303 \ 244 \ 303 \ 245 \ 303 \ 246 \ 303 \ 247 \ 303 \ 250 \ 303 \ 251 \ 303 \ 252 \ 303 \ 253 \ 303 \ 254 \ 303 \ 255 \ 303 \ 256 \ 303 \ 257 \ 303 \ 261 \ 303 \ 262 \ 303 \ 263 \ 303 \ 264 \ 303 \ 265 \ 303 \ 266 \ 303 \ 270 \ 303 \ 271 \ 303 \ 272 \ 303 \ 273 \ 303 \ 274 \ 303 \ 275 \ 303 \ 277 ',' AAAAAAACEEEEIIIINOOOOOOUUUUYSaaaaaaaeeeeiiiinoooooouuuuyy)

0
source share
1 answer

Do you only do this for indexing / sorting? If so, you can use this postgresql extension , which provides proper Unicode sorting. In the same group, the postgresql extension for normalization .

+2
source

Source: https://habr.com/ru/post/1303724/


All Articles