http://coldfusion.com logo
#lucee
Title
# lucee
m

mauzer

03/25/2022, 2:12 PM
Is there an issue with Lucee > Postgres. I'm getting this error when hitting this stored procedure after switching from MS SQL to Postgres. The stored procedure executes just fine in Postgres but when Lucee makes the call I get this:
m

Michael Schmidt

03/25/2022, 2:15 PM
You didn't relate you other post in cfml-general.. but my gut would be you are using cf_sql_numeric when the datatype in the stored procedure is integer. Make sure all your parameters match the type they are going into.
👍 1
also boolean doesn't necessarily match numeric as well..
👍 1
m

mauzer

03/25/2022, 2:28 PM
Just done that but ufortunately that didnt work :-(
Just broke it all done to just one parameter: <cfstoredproc procedure="dbo.spGetAOID" datasource="#session.dsn#"> <cfprocparam cfsqltype="CF_SQL_INTEGER" value="123"> </cfstoredproc>
ERROR: function spgetaoid(integer) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 15*Detail*Parameter types passed (1): CF_SQL_INTEGER*SQL*{ call spGetAOID(?) }*DatabaseName*PostgreSQL*DatabaseVersion*13.4
same error despite matching types
s

Scott Steinbeck

03/25/2022, 6:03 PM
a huge gotcha with postgres is casing. is your function named
spgetaoid
all lower case or does it have camel casing in it?
you may need to lower case your function name to allow it to match.
@mauzer
m

mauzer

03/25/2022, 9:49 PM
Yep good point but I was aware of that and changed it accordingly but still nothing I'm afraid 😱
s

Scott Steinbeck

03/25/2022, 9:57 PM
im curious why there are 28 parameters passed, but the function above only shows 11
m

mauzer

03/30/2022, 8:54 AM
I broke it down to just one parameter and still getting the same error