Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andyatkinson/db-stuff
Tutorials from PostgreSQL Stored Procedures
https://github.com/andyatkinson/db-stuff
postgresql sql
Last synced: 13 days ago
JSON representation
Tutorials from PostgreSQL Stored Procedures
- Host: GitHub
- URL: https://github.com/andyatkinson/db-stuff
- Owner: andyatkinson
- Created: 2018-08-24T17:12:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T17:12:47.000Z (about 6 years ago)
- Last Synced: 2024-10-10T03:41:29.519Z (about 1 month ago)
- Topics: postgresql, sql
- Language: PLpgSQL
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tutorials from [PostgreSQL Stored Procedures](http://www.postgresqltutorial.com/postgresql-stored-procedures/)
#### Stored procedures
`\df` to list all stored procedures
View stored procedure code with `\df+ function`, e.g. `\df+ inc` or `\ef func` to edit the function
`inc` - increment a number
Usage: `SELECT inc(20);``get_sum(a,b)`
Usage: `select get_sum(1,2);``hi_lo(a,b,c)`
Usage: `select hi_lo(1,2,3);``sum_avg(NUMERIC[])`
Usage: `select sum_avg(1,2,3,4,5);`