You are comparing apples to oranges. The trigram similarity, as the documentation states, is measured by
the number of trigrams they share.
You can easily see that, by that measure, the two strings in the first example have very little in common: they only share one trigram:
select show_trgm( 'GTudH'),show_trgm('tud')
show_trgm |
show_trgm |
{" g"," gt","dh ",gtu,tud,udh} |
{" t"," tu",tud,"ud "} |
Your Snowflake example, however, shows the Jaro-Winkler similarity, which uses an entirely different algorithm, so it stands to reason that the result will also be quite different.