PgP How-to ...
Here is a simple guide to how to use the Pgp.
Assuming the database has been created and the tables have been
created and all the tables have a primary key (Sine-qua nun condition)
Installing the script
- Open the database through command line or your favorite GUI tools
- Download the Pgp Script here
- Create a schema called utils. Here
is help on how to create a schema.
- Run the script downloaded:
- If you are using psql then use the \i option as shown here
- If you are using a GUI client then open the file and run it.
Creating Stored Procedures for public.foo
- When the script has run the utility is already installed and ready to go:
- Suppose your table (foo) was created in the default schema run the following command select utils.generatestoredprocedures('public','foo') ;