EPUB | CHM | PDF

Creating a Stored Procedure or Function

Top Previous Next

To create a new procedure (later on you can switch it to a stored function), click on the Stored Procedure (icon-new-storedproc) icon on the Palette toolbar. Your mouse cursor will change its appearance. Click on the diagram area to create a new stored procedure. A rectangle with the name of the stored procedure will appear in the diagram:

object-stored-procedure

Visual representation may vary: if an object has at least one output parameter, then it will be shown as above (procedure notation). If return type is trigger, then it will be shown in trigger procedure notation. If return type is language_handler, then it will be shown in Language Handler procedure notation. In other cases it will have function notation representation.

object-stored-function

 

object-stored-trigger-procedure

 

object-stored-langhandler-procedure

Basically, PostgreSQL has only functions. To edit parameters of the stored procedures and functions use Stored Routine Editor.

See also:
Stored Procedures and Functions | Stored Routine Manager