Provide the steps if possible.
Procedure is a Database function that you create in any RDMS. read more here PostgreSQL - CREATE PROCEDURE - GeeksforGeeks
In vConnect, you can create API’s directly for DB procedure.
@Ritik_Dixit please provide the example
Hello @Gitika_Verma.
A Procedure is a set of SQL statements that perform a specific task and are stored in the database. It allows for reusable, precompiled logic to be executed multiple times without rewriting queries.
Steps to Create a Procedure in PostgreSQL
-
Open your database and select the schema where you want to create the procedure or function.
-
Navigate to the “Functions” section under the selected schema.
Create a new procedure or function as needed.
Basic Syntax for a Procedure
CREATE OR REPLACE PROCEDURE procedure_name(parameters)
LANGUAGE plpgsql
AS $$
BEGIN
– SQL statements
END;
$$;
Example: Creating a Procedure
Here, I have created a procedure named get_user_by_id
:
Configuring the Procedure in Vconnect
Go to Vconnect and select the database where you created the procedure.