https://github.com/liaartem/postgresql14
PostgreSQL integration with WEB-services (PL/Python -> HTTP method GET,POST and send e-mail, PL/pgSQL -> JSON, XML, CSV)
https://github.com/liaartem/postgresql14
pgsql postgresql
Last synced: about 1 year ago
JSON representation
PostgreSQL integration with WEB-services (PL/Python -> HTTP method GET,POST and send e-mail, PL/pgSQL -> JSON, XML, CSV)
- Host: GitHub
- URL: https://github.com/liaartem/postgresql14
- Owner: LiaArtem
- Created: 2021-05-06T18:46:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-10T11:01:37.000Z (over 4 years ago)
- Last Synced: 2025-02-01T16:47:54.221Z (over 1 year ago)
- Topics: pgsql, postgresql
- Language: PLpgSQL
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostgreSQL14
PostgreSQL integration with WEB-services (PL/Python -> HTTP method GET,POST and send e-mail, PL/pgSQL -> JSON, XML, CSV)
DB PostgreSQL 14 + Python 3.9
IDE - DBeaver
Установка и настройка:
-------------------------------
1) Устанавливаем PostgreSQL 14
2) Создаем базу данных test_database и пользовалеля test_user (скрипты ./1_create_db_and_user/)
3) Включение отладки в PostgreSQL
- c:\Program Files\PostgreSQL\14\data\postgresql.conf правим файл - меняем
с
#shared_preload_libraries = '' # (change requires restart)
на
shared_preload_libraries = 'plugin_debugger' # (change requires restart)
- Перезагрузите сервер, подключиться к БД и вызов:
- CREATE EXTENSION pldbgapi;
4) Добавление поддержки Python 3 в PostgreSQL
- Проверить поддерживаему версию Python для PostgreSQL (c:\Program Files\PostgreSQL\14\doc\installation-notes.html)
- устанавливаем Python python-3.9.XXX-amd64.exe
-> Install Launcher for all user - включить
-> Add Python 3.9 to PATH - включить
-> !!!! Customize installation
-> NEXT
-> !!!! Install for all users - включить
-> Disable MAX_LIMIT - выполнить.
-> Завершить
- Перезагрузить ПК подключиться к БД и вызов:
- CREATE EXTENSION plpython3u;
5) Backup (pgAdmin 4)
- Запускаем pgAdmin 4
- Servers -> Dashboard -> Configure pgAdmin -> Patch -> Binary patch
- Поле PostgreSQL Binary Path = C:\Program Files\PostgreSQL\14\bin\
- На базе выполнить Backup
6) Backup (DBeaver)
- На базе правой клавишей -> Tools -> Backup
- Хранится в C:\Users\Admin\dump-test_database-202105062020.sql (пример)
Добавление объектов базы данных
-------------------------------
1) Выполняем скрипты
- ./2_sql_test_schemas/
- ./3_sql_p_check/
- ./4_sql_p_convert/
- ./5_sql_p_interface/
- ./6_sql_p_service/
- ./7_sql_public/