I am trying to run a function from sequelize.js against my postgres database. The function works fine when I run it through RazorSQL (database IDE), but it throws an error when running it from sequelize.js on a node server.
I tried it for both functions with and without parameters.
CoffeeScript on Node Server
query = "SELECT * FROM order.base_orders(); "
sequelize.query(query, null, {raw: true}).success (rows) =>
deferred.resolve rows
.error (error) =>
deferred.reject error
It returns the following error.
{
"error": {
"name": "error",
"length": 216,
"severity": "ERROR",
"code": "42883",
"hint": "No function matches the given name and argument types. You might need to add explicit type casts.",
"position": "15",
"file": "parse_func.c",
"line": "306",
"routine": "ParseFuncOrColumn",
"sql": "SELECT * FROM order.base_orders(); "
}
}