Created
July 5, 2019 17:21
-
-
Save artemrogov/c529f9b73aba43d3c1817799d3a28af2 to your computer and use it in GitHub Desktop.
команды СУБД PostgreSQL
This file contains hidden or 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
#просмотр таблиц схемы: | |
select table_name FROM information_schema.tables WHERE table_schema NOT IN('inforamtion_schema','pg_catalog') AND table_schema IN('public','<имя_схемы>'); | |
#список схемы БД: | |
\dn | |
#список ролей БД | |
\du | |
#Список БД | |
\l+ | |
#Структура таблицы БД (схемы) | |
\d <name_schema.table_name> | |
---------------------------------------------------------------------------------------------------------------------------- | |
#Дамп и восстановление БД: | |
#установка чистого дампа без данных: | |
psql dwh < имя_файла_с_дампом | |
#Установить ЯП для хранимых процедур(python): | |
createlang plpythonu <db_name> | |
#Инструкции по установке расширений для PostgreSQL: | |
1)Установка POSTGIS: | |
https://www.gis-blog.com/how-to-install-postgis-2-3-on-ubuntu-16-04-lts/ | |
2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment