Skip to content

Instantly share code, notes, and snippets.

@langpavel
Created February 11, 2016 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save langpavel/e1f8a791eabc7e4b4b3e to your computer and use it in GitHub Desktop.
Save langpavel/e1f8a791eabc7e4b4b3e to your computer and use it in GitHub Desktop.
PostgreSQL česká template1 šablona
/* PostgreSQL česká template1 */
UPDATE pg_database SET datistemplate = false WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 template=template0 encoding='UTF-8' LC_COLLATE='cs_CZ.UTF-8' LC_CTYPE='cs_CZ.UTF-8';
COMMENT ON DATABASE template1 IS 'Výchozí česká databáze';
UPDATE pg_database SET
datacl = (SELECT datacl FROM pg_database WHERE datname = 'template0'),
datistemplate = true
WHERE datname = 'template1';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment