Postgresql base64 encode -


i need convert db value base64encode. tried:

 select encode(cast(est_name text),'base64') establishments; 

it showing error

[sql]select encode(string(cast(est_name text)),'base64') establishments;  [err] error:  function string(text) not exist line 1: select encode(string(cast(est_name text)),'base64') ...                       ^ hint:  no function matches given name , argument types. might need add explicit type casts. 

where wrong? please help. in advance

the encode function encodes bytea text.

select encode(est_name::bytea, 'base64')  establishments; 

http://www.postgresql.org/docs/current/static/functions-binarystring.html#functions-binarystring-other


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -