Answer the question
In order to leave comments, you need to log in
What causes the POSTGRESQL procedure to fail?
my procedure
CREATE OR REPLACE FUNCTION auto_increment_version(id bigint)
RETURNS bigint
LANGUAGE plpgsql
AS $$
DECLARE
res BIGINT;
BEGIN
SELECT COUNT(*)
INTO res
FROM appsellschema."product-version"
WHERE template_id = id;
RETURN res+1;
END;
$$;
SELECT appsellschema.auto_increment_version(1);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question