urlencode with only built-in functions

后端 未结 4 2076
抹茶落季
抹茶落季 2021-01-20 06:51

Without using plpgsql, I\'m trying to urlencode a given text within a pgsql SELECT statement.

The problem with this approach:

select regexp_replace(\         


        
4条回答
  •  自闭症患者
    2021-01-20 07:31

    select regexp_replace(encode('héllo there','hex'),'(..)',E'%\\1','g');
    

    This doesn't leave the alphanumeric characters human-readable, though.

提交回复
热议问题