![]() ![]() Cyberteci uudiskirja elektroonilisel teel vastuvõtmiseks nõusoleku andmine on vabatahtlik ja seda saab igal ajal tasuta tagasi võtta. Jah, ma soovin saada regulaarselt e-posti teel teavet uute toodete, praeguste pakkumiste ja uudiste kohta PostgreSQLi kohta. Yes, I would like to receive information about new products, current offers and news about PostgreSQL via e-mail on a regular basis.įurther information can be found in the privacy policy. Wyrażenie zgody na otrzymywanie Newslettera Cybertec drogąĮlektroniczną jest dobrowolne i może zostać w każdej chwili bezpłatnie odwołane.Więcej informacji Tak, chcę regularnie otrzymywać wiadomości e-mail o nowych produktach, aktualnych ofertach i Granting consent to receive the Cybertec Newsletter by electronic means is voluntary and can be withdrawn free of charge at any time.įurther information can be found in the privacy policy. Yes, I would like to receive information about new products, current offers and news about PostgreSQL via e-mail on a regular basis. ![]() Granting consent to receive the CYBERTEC Newsletter by electronic means is voluntary and can be withdrawn free of charge at any time.įurther information can be found in the privacy policy. ![]() Weitere Informationen finden Sie in der Datenschutzerklärung. ![]() Ich kann diese Zustimmung jederzeit widerrufen. Ja, ich möchte regelmäßig Informationen über neue Produkte, aktuelle Angebote und Neuigkeiten rund ums Thema PostgreSQL per E-Mail erhalten. If you want to index on an unaccented string you have to create an additional column, which contains a pre-calculated value (“materialized”). However, a functional index has to return an immutable result, which is not the case here. PostgreSQL supports the creation of indexes on functions. Test=# CREATE INDEX idx_accent ON t_name (unaccent(name)) ĮRROR: functions in index expression must be marked IMMUTABLE When using unaccent there is one thing, which you should keep in mind. In both cases PostgreSQL will return true, which is exactly what we want. Test=# SELECT unaccent('Schönig') = unaccent('Schönig') Test=# SELECT unaccent('Schönig') = unaccent('Schonig') The beauty is that we can easily compare strings in a more tolerant and more user-friendly way: Test=# SELECT unaccent('Cybertec Schönig & Schönig GmbH') Hans-Jurgen Schonig, Grohrmuhlgasse 26, Wiener Neustadt Test=# SELECT unaccent('Hans-Jürgen Schönig, Gröhrmühlgasse 26, Wiener Neustadt') This is what happens when we use the “unaccent” function on my name and the name of my PostgreSQL support company: In the next step you can call the “unaccent” function to clean a string and turn it into something more useful. If you want to improve your user experience you can turn to the “unaccent” extension, which is shipped as part of the PostgreSQL contrib package. unaccent: PostgreSQL provides a useful extension A solution to the problem is therefore needed. Problems like that can make daily life pretty hard. While that is true from a technical point of view it might be a real issue and end users might be unsatisfied with the result. Therefore, the correct answer is “false”. The “=” operator compares those two strings and concludes that those two strings are not identical. And: Who cares about my special characters anyway? People might just want to type in “Schonig” into some search form and find information about me (ideally related to PostgreSQL and database work). The correct spelling of my surname is “Schönig”, which is pretty hard to type on most keyboards I have seen around the world. This is especially true if you want to implement search in a user-friendly way.Ĭonsider the following example in PostgreSQL: My name contains a couple of super inconvenient special characters, which will cause issues for people around the globe. Database people dealing with natural languages are all painfully aware of the fact that encodings, special characters, accents and alike are usually hard to deal with. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |