JeyJ
JeyJ

Reputation: 4070

Sending string as text to function POSTGRESQL

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

I have another function func1. In func1 I summon func2 : PERFORM func2('aa',b). b is a text variable that I initialize.

I get the next error : function func2(unkown,text) does not exist.

any help ? Is there a way to convery string to text ?

Upvotes: 3

Views: 87

Answers (1)

Christian Stade-Schuldt
Christian Stade-Schuldt

Reputation: 4861

You can explicitly cast your String to Text by calling the function with

 func2('aa' :: TEXT,b)

Upvotes: 3

Related Questions