sql - Special superscript characters -
how insert string super script characters in postgresql?
i want insert "tm" power of string "rach"? tried following query:
update contact set name=e'rach$^'tm id='10782'
i don't know if possible convert symbols supersripts without creating mapping function that, can write manually:
update contact set name='rachᵀᴹ' id='10782'
mapping function this:
create or replace function superscript(data text) returns text $$ declare ss text[]; lt text[]; begin ss := '{ᴬ,ᴮ,ᴰ,ᴱ,ᴳ,ᴴ,ᴵ,ᴶ,ᴷ,ᴸ,ᴹ,ᴺ,ᴼ,ᴾ,ᴿ,ᵀ,ᵁ}'; lt := '{a,b,d,e,g,h,i,j,k,l,m,n,o,p,r,t,u}'; in 1..array_length(ss, 1) loop data := replace(data, lt[i], ss[i]); end loop; return data; end; $$ language plpgsql;
Comments
Post a Comment