Support for PostgreSQL
csaf4370 opened this issue ยท 10 comments
Hi!
I really like this project and the idea of it! Great work.
My goto db is PostgreSQL, are there any plans to support it?
Well the plans are there but the time is not (as in: I don't have any time). I also don't have a direct need myself, which probably means that we will need to rely on outside contributions to add support for other databases.
However, implementing a basic version of it should be possible without too much effort, because I wrote the software with extensibility in mind.
Basically the actual database operations are contained in two different sets of tiny files, and during setup ("db init
") you already have to choose the database type so that the software knows where to find these files.
I would love to see PostgreSQL support. You could get started by copying the mysql
folder in the bin/drivers
into a new postgresql
folder, and then changing the four scripts ('load', 'save', ...) in the postgresql\connectors\direct
folder until they can make a backup, restore a backup, test the database connection, and run a direct SQL query. I think that's the meat of what needs to happen to add PostgreSQL support.
Thanks for the detailed reply,
I started with the postgresql support, but I'm not done yet. Hopefully the next few weeks, will allow me to finish it.
Cheers
Awesome!
Hey @csaf4370! I'm interested in this too. How much work is involved? Can I be of help?
@csaf4370 Any chance you can share what you have so far? However buggy or incomplete?
sorry for the late reply, I already got a few things working.
When I'm at home I'll publish my fork and the current status.
edit: here we go:
my fork lives in https://github.com/csaf4370/db.git
branch: postgresql
make sure that the current repository is already postgresql or a new one.
Currently you can not mix mysql and postgresql in the same repository.
currently working:
- db init with postgresql and direct connector
- connection test for the init part
- db save
- db export
whats certainly currently missing:
- db load
- db import
- db server add (somehow works, but not fully)
All the best.
see above comment... not sure if you get a notification for the edit.
Sorry, I've been sick all week. I'll have a look at this early next week - thanks for sharing!
You guys are awesome! I'm really looking forward to it. :)
Maybe this repo could help somehow:
https://github.com/postgrespro/pg_probackup