Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| -- check for containment | |
| -- i.e. index A contains index B | |
| -- and both share the same first column | |
| -- but they are NOT identical | |
| WITH index_cols_ord as ( | |
| SELECT attrelid, attnum, attname | |
| FROM pg_attribute | |
| JOIN pg_index ON indexrelid = attrelid | |
| WHERE indkey[0] > 0 |
| /* The bloat estimation queries moved to this respository: | |
| * https://github.com/ioguix/pgsql-bloat-estimation | |
| */ |
| WITH table_scans as ( | |
| SELECT relid, | |
| tables.idx_scan + tables.seq_scan as all_scans, | |
| ( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes, | |
| pg_relation_size(relid) as table_size | |
| FROM pg_stat_user_tables as tables | |
| ), | |
| all_writes as ( | |
| SELECT sum(writes) as total_writes | |
| FROM table_scans |