Closed mynameistian closed 4 years ago
The error is from the PostgreSQL server, not the client/driver:
psql> PREPARE stmt AS select money($1);
ERROR: function money(unknown) is not unique
LINE 1: PREPARE stmt AS select money($1);
^
HINT: Could not choose a best candidate function. You might need to add explicit type casts.
As recommended in the error, use type casts:
psql> PREPARE stmt AS select $1::money;
PREPARE
Thank you. I've changed the money type to the numeric type.I don't think I can manage the type of money type right now.
Hi,friend:
I encountered a problem when Using Go-pGSQL, which is as follows:
Execute the SQL statement as follows:
Select * from books where price BETWEEN money(10)and Money (100)
In the use of Golang, the following error occurs:
The function money(Unknown) is not unique and cannot select the best candidate function
Please see the picture below for more information
Looking forward to your reply