Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bluecolor/pgutil
postgres utility functions
https://github.com/bluecolor/pgutil
Last synced: about 1 month ago
JSON representation
postgres utility functions
- Host: GitHub
- URL: https://github.com/bluecolor/pgutil
- Owner: bluecolor
- Created: 2018-10-02T13:10:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T10:58:20.000Z (about 1 year ago)
- Last Synced: 2024-04-16T10:31:37.670Z (9 months ago)
- Language: PLpgSQL
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
- create util schema
```sql
CREATE SCHEMA util
```- create functions under `functions`
# example usage:
- create a demo table
```sql
create table util.dropme ( -- can be any name
a text
);
```- call the drop method from util
```sql
DO $$
BEGIN
perform util.drop_table('util.dropme');
END;
$$;```
- see the logs with:
```sql
select * from util.logs
```