Regarding to this issue, I posted it yesterday and then hid it because I realized I needed some time to verify the behavior and give more accurate information.
I have wrote 2 back functions:
1. The first one returns the "current_user" variable as it is (although the return type of the function is TEXT):

The result in this case is "admin" (as expected).

2. The second one returns the "current_user" variable after casting the value to TEXT (also the return type of the function is TEXT):

But in this case the result is "rei3" (the user to connect to the database !?)

Well, I don't know well the details of the PL/PgSQL language but I would say that the result should be the same in both cases, right?
Thanks in advance for helping me to clarify this.
Regards.