Drop all the tables in a PostgreSQL database
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
COMMENT ON SCHEMA public IS 'standard public schema';| // My ugly style scheme for VSCode Todo Tree | |
| // https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree | |
| "todo-tree.highlights.customHighlight": { | |
| "TODO": { | |
| "background": "green", | |
| "iconColour": "green", | |
| }, | |
| "FIXME": { | |
| "background": "yellow", |
Drop all the tables in a PostgreSQL database
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
COMMENT ON SCHEMA public IS 'standard public schema';| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import pytest | |
| # Обход проблемы импорта из вышестоящего каталога | |
| # https://stackoverflow.com/a/11158224/8785369 | |
| import os, sys, inspect | |
| currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) | |
| parentdir = os.path.dirname(currentdir) |
| # search in history with arrows | |
| bind '"\e[A": history-search-backward' 2>/dev/null | |
| bind '"\e[B": history-search-forward' 2>/dev/null |
| #!/bin/bash | |
| mail_dir="/srv/mailboxes/" | |
| find_problems(){ | |
| local mail_box="$1" | |
| find "$mail_box" -mindepth 1 -maxdepth 1 -type d \ | |
| -name cur -o -name new -o -name tmp \ | |
| | while IFS= read -r work_dir; do | |
| grep -R -L '^Date:' "$work_dir" |