This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE pg_database SET datallowconn = TRUE WHERE datname = 'template0'; | |
\c template0 | |
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH TEMPLATE = 'template0'; | |
\c template1 | |
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; | |
UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i {filename} -acodec aac -ac 2 -strict experimental -ab 160k -s {ssize} -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 {filename}.ipad.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH RECURSIVE tables_tree (table_oid, path) AS ( | |
SELECT I.inhparent AS table_oid, '{}'::oid[] AS path | |
FROM pg_inherits I | |
LEFT JOIN pg_inherits I2 ON I.inhparent = I2.inhrelid | |
WHERE I2.inhparent IS NULL | |
UNION | |
SELECT I.inhrelid, TT.path || I.inhparent | |
FROM pg_inherits I |