-
Notifications
You must be signed in to change notification settings - Fork 1
POSTGRES_IMPORTER
GitHub Actions edited this page Jan 2, 2026
·
1 revision
Stand: 5. Dezember 2025
Version: 1.0.0
Kategorie: Importers
Version: 1.0.0
Type: Data Importer
Format: pg_dump SQL
ThemisDB PostgreSQL Importer Plugin zum Importieren von PostgreSQL-Datenbanken via pg_dump SQL-Dumps.
- ✅ pg_dump SQL-Format - Direkter Import von PostgreSQL-Dumps
- ✅ Schema-Parsing - CREATE TABLE, CREATE SCHEMA
- ✅ Daten-Import - INSERT und COPY statements
- ✅ Typ-Mapping - Automatische Konvertierung PostgreSQL → ThemisDB
- ✅ Batch-Processing - Konfigurierbare Batch-Größe
- ✅ Fortschritt-Tracking - Progress-Callbacks
- ✅ Dry-Run-Modus - Validierung ohne Import
- ✅ Filter - Include/Exclude Tabellen
# Plugin-Struktur
plugins/importers/postgres/
├── plugin.json # Manifest
├── plugin.json.sig # Signatur
├── themis_import_postgres.dll # Windows
├── themis_import_postgres.so # Linux
└── themis_import_postgres.dylib # macOSauto& pm = PluginManager::instance();
pm.scanPluginDirectory("./plugins");
auto* plugin = pm.loadPlugin("postgres_importer");
auto* importer = static_cast<IImporter*>(plugin->getInstance());#include "importers/importer_interface.h"
// Create importer
auto importer = /* get from plugin manager */;
// Import options
ImportOptions options;
options.batch_size = 1000;
options.default_namespace = "imported";
options.dry_run = false;
// Import data
auto stats = importer->importData("dump.sql", options);
// Check results
std::cout << "Imported: " << stats.imported_records << " records" << std::endl;
std::cout << "Failed: " << stats.failed_records << " records" << std::endl;ImportOptions options;
auto progress = [](const std::string& stage, size_t current, size_t total) {
std::cout << stage << ": " << current << "/" << total << std::endl;
};
auto stats = importer->importData("dump.sql", options, progress);| PostgreSQL | ThemisDB |
|---|---|
| INTEGER, INT, SERIAL | integer |
| BIGINT, BIGSERIAL | long |
| SMALLINT | integer |
| REAL, FLOAT | double |
| DOUBLE PRECISION | double |
| NUMERIC, DECIMAL | double |
| BOOLEAN, BOOL | boolean |
| CHAR, VARCHAR, TEXT | string |
| TIMESTAMP | datetime |
| DATE | date |
| TIME | time |
| JSON, JSONB | json |
| UUID | string |
| BYTEA | binary |
DDL:
CREATE SCHEMA app;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) NOT NULL,
email VARCHAR(100),
created_at TIMESTAMP DEFAULT NOW()
);DML:
-- INSERT
INSERT INTO users (id, username, email) VALUES
(1, 'alice', 'alice@example.com'),
(2, 'bob', 'bob@example.com');
-- COPY
COPY users (id, username, email) FROM stdin;
1 alice alice@example.com
2 bob bob@example.com
\.# SQL-Format (empfohlen)
pg_dump -d mydb -f dump.sql --inserts
# Mit COPY (schneller)
pg_dump -d mydb -f dump.sql
# Nur Schema
pg_dump -d mydb -f schema.sql --schema-only
# Nur Daten
pg_dump -d mydb -f data.sql --data-onlystruct ImportOptions {
// General
bool dry_run = false;
bool continue_on_error = true;
size_t batch_size = 1000;
// Schema
bool auto_create_schema = true;
std::string default_namespace = "imported";
// Data
bool preserve_ids = false;
bool update_existing = false;
bool skip_duplicates = true;
// Filtering
std::vector<std::string> include_tables;
std::vector<std::string> exclude_tables;
std::vector<std::string> include_schemas;
// Transformations
std::map<std::string, std::string> column_mappings;
std::map<std::string, std::string> table_mappings;
};- ❌ Live-Connection - Nur pg_dump Files
- ❌ Komplexe SQL - Nur Basic DDL/DML
- ❌ Foreign Keys - Werden ignoriert
- ❌ Triggers - Werden ignoriert
- ❌ Functions - Werden ignoriert
- ❌ Custom Types - Nur Standard-Typen
- Live PostgreSQL Connection (via libpq)
- Incremental Import (delta updates)
- Foreign Key Preservation
- Custom Type Mapping
- Parallel Processing
- Resume after failure
Status: ✅ Production-Ready
Getestet mit: PostgreSQL 12, 13, 14, 15, 16
Dokumentation: docs/importers/POSTGRES_IMPORTER.md
ThemisDB v1.3.4 | GitHub | Documentation | Discussions | License
Last synced: January 02, 2026 | Commit: 6add659
Version: 1.3.0 | Stand: Dezember 2025
- Übersicht
- Home
- Dokumentations-Index
- Quick Reference
- Sachstandsbericht 2025
- Features
- Roadmap
- Ecosystem Overview
- Strategische Übersicht
- Geo/Relational Storage
- RocksDB Storage
- MVCC Design
- Transaktionen
- Time-Series
- Memory Tuning
- Chain of Thought Storage
- Query Engine & AQL
- AQL Syntax
- Explain & Profile
- Rekursive Pfadabfragen
- Temporale Graphen
- Zeitbereichs-Abfragen
- Semantischer Cache
- Hybrid Queries (Phase 1.5)
- AQL Hybrid Queries
- Hybrid Queries README
- Hybrid Query Benchmarks
- Subquery Quick Reference
- Subquery Implementation
- Content Pipeline
- Architektur-Details
- Ingestion
- JSON Ingestion Spec
- Enterprise Ingestion Interface
- Geo-Processor Design
- Image-Processor Design
- Hybrid Search Design
- Fulltext API
- Hybrid Fusion API
- Stemming
- Performance Tuning
- Migration Guide
- Future Work
- Pagination Benchmarks
- Enterprise README
- Scalability Features
- HTTP Client Pool
- Build Guide
- Implementation Status
- Final Report
- Integration Analysis
- Enterprise Strategy
- Verschlüsselungsstrategie
- Verschlüsselungsdeployment
- Spaltenverschlüsselung
- Encryption Next Steps
- Multi-Party Encryption
- Key Rotation Strategy
- Security Encryption Gap Analysis
- Audit Logging
- Audit & Retention
- Compliance Audit
- Compliance
- Extended Compliance Features
- Governance-Strategie
- Compliance-Integration
- Governance Usage
- Security/Compliance Review
- Threat Model
- Security Hardening Guide
- Security Audit Checklist
- Security Audit Report
- Security Implementation
- Development README
- Code Quality Pipeline
- Developers Guide
- Cost Models
- Todo Liste
- Tool Todo
- Core Feature Todo
- Priorities
- Implementation Status
- Roadmap
- Future Work
- Next Steps Analysis
- AQL LET Implementation
- Development Audit
- Sprint Summary (2025-11-17)
- WAL Archiving
- Search Gap Analysis
- Source Documentation Plan
- Changefeed README
- Changefeed CMake Patch
- Changefeed OpenAPI
- Changefeed OpenAPI Auth
- Changefeed SSE Examples
- Changefeed Test Harness
- Changefeed Tests
- Dokumentations-Inventar
- Documentation Summary
- Documentation TODO
- Documentation Gap Analysis
- Documentation Consolidation
- Documentation Final Status
- Documentation Phase 3
- Documentation Cleanup Validation
- API
- Authentication
- Cache
- CDC
- Content
- Geo
- Governance
- Index
- LLM
- Query
- Security
- Server
- Storage
- Time Series
- Transaction
- Utils
Vollständige Dokumentation: https://makr-code.github.io/ThemisDB/