I trying to do a SP using postgresql 12
CREATE OR REPLACE PROCEDURE trans_buy(
_name_client varchar(25),
_id_product smallint,
_mount smallint
)
LANGUAGE plpgsql
AS
$$
BEGIN
INSERT INTO invoices (cliente) VALUES(_name_client);
INSERT INTO invoices_details (id_invoice, id_product, mount) VALUES (1, _id_product, _mount, 100);
END
$$
but when i tried to call this sp using: CALL trans_buy('james', 3, 10) i got this message error:
doesnt exists the stored procedure << trans_buy(unknown, integer, integer) >>
HINT: No procedure matches the name and types of arguments. It may be necessary to add explicit type conversion.