Sending a string as text for the POSTGRESQL function

I have the following function: func2(text a, text b)

I have another function func1. In func1, I call func2: PERFORM func2 ('aa', b). b is the text variable that I am initializing.

I am getting the following error: function func2 (unkown, text) does not exist.

any help? Is there a way to turn text into text?

+3


source to share


1 answer


You can explicitly pass your string to text by calling the function with



 func2('aa' :: TEXT,b)

      

+3


source







All Articles