I'm trying to use Postgresql encode() function and put some other functions as it's arguments. I get errors, and I can't understand why.
I am using Postgres 9.6.14 on Windows.
- This works fine and returns
698d51a19d8a121ce581499d7b701668
select md5('111');
- This also works fine and returns some value
select encode('698d51a19d8a121ce581499d7b701668', 'base64');
- But this one, which combines the first 2, doesn't work and returns
"ERROR: function encode(text, unknown) does not exist"
select encode(md5('111'), 'base64');
- This also doesn't work and returns the same error
select encode(concat('1', '11'), 'base64');
- I thought that there is a rule which prevents to use one function inside another, but the following one works fine and returns the same value as the first request here, as expected.
select md5(concat('1', '11'))
So what's the issue with requests number 3 and 4 and encode()
function overall?