Reputation: 177
i am creating a PROCEDURE in TimescaleDB (which is based on PostgreSQL) like this:
CREATE or replace procedure insert_oee()
LANGUAGE SQL
as $$
INSERT INTO public.oee_t1 (columns)
(select
some_columns
from
a_table)
$$;
Which works fine and does not return any error when creating.
and then I am creating a job like this:
SELECT add_job('job_name','24h',initial_start=> 'some_date')
which works fine too.
and then when trying to run it like this:
call run_job(1002)
i get the error 'function public.insert_oee(job_id INT, config JSONB) not found'
but if I list all the procedures like this:
SELECT
*
FROM
information_schema.routines
WHERE
routine_type = 'PROCEDURE'
the procedure is listed.
Why do I get the error?
Upvotes: 2
Views: 263
Reputation: 177
this post can be helpful: there are some parameters to be specified as it is said in this documentation page.
You (that's funny) are missing the arguments when creating the procedure, run it again with this header and it will be fine; even if you pass nothing (which is equivalent to null,null) it will run fine.
CREATE or replace procedure insert_oee(job_id INT, config JSONB)
with the standard parameters specified.
Upvotes: 2