It's getting harder and harder to find C/C++ programs. Many developers are working in other languages. Developers should have the choice to work in whatever language they want. However, it's dismaying to see the lack of C/C++ software currently available.

I recently tried to find FLOSS programs to set up a database structure and transfer tables from a working database to a new one. I'm trying to migrate the information from Microsoft SQL to PostgreSQL. While both systems have some great tools, I found it hard to locate easy to install, stable programs that could get the job done.

Microsoft SQL has sqlcmd and bcp. These programs can be used to query data from scripts or dump tables. PostgreSQL has psql and pg_dump. These have similar functions. While one should theoretically be able to use bcp to output a table and psql with the copy command to load a table, actually doing it successfully is another story. Any irregular data causes the transfer to fail. While these tools are really nice for batch scripting, they have limited use in some cases.

I saw recommendations for tools such as pgloader, ingestr, embulk and DBeaver to help me get the job done. It took forever to get pgloader to accept irregular passwords. I finally got a script that sort of worked. It moved 500 table structures over from Microsoft SQL to PostgreSQL. It started moving data and then it hung saying max connections reached. Changing its settings to try to make it use less connections did nothing. Plus, pgloader wiped out any tables and data I had already tried to move previously. Trying to install ingestr and embulk was a nightmare. Even with package manager tools like dnf, I was unable to get them fully installed and working properly. The tools are written in Python and Java. They require tons of support packages. The packages need to be installed using other methods than the local package manager such as by pip. I got absolutely nowhere with these solutions. I was told dbeaver could be used as a tool to copy schemas similar to pgloader. When I tried to get information on generating indexes in PostgreSQL that were equivalent to the ones in Microsoft SQL, I just kept getting errors. So, I found a lot of these heavyweight tools to be useless for my needs. They downloaded a lot of files that took up a great deal of disk space. It was hard to find and cleanly remove all the files they needed.

All I wanted was a simple C program that could do the data transfer and wouldn't need hundreds of files and packages installed. I knew a C program could do the job properly because I already had a transfer program that I'd written using C and ODBC that could copy tables. It was written to work with one row at a time which works great with smaller tables or individual inquiries but it wasn't designed for a large data warehouse with millions of rows per table. I spent a week rewriting my C table transfer program to work in batch mode. The new program is specifically designed to copy a Microsoft SQL table to an equivalent PostgreSQL table as quickly as possible. It does nothing more. It doesn't copy PostgreSQL to Microsoft SQL or handle deltas or translation of data. However, it just works and it works very quickly. It doesn't need a lot of space or memory. I wish there were more tools like these available. They're small, efficient and do one job well.

I now have a collection of ODBC based C tools that have been tested on a variety of systems from Windows to Linux to AIX. They do things such as run a query against a database, transfer rows from a table from one database to another, download rows to CSV or XML and more. For small tables, I can download each row to its own XML file. I can do that for multiple databases. I can then run directory/file a comparison tool to compare XML files and see if rows are different between two databases. It would be fun to share tools like these and eventually create enough lightweight tools that they could replace functionality of some of the more expensive commercial ETL or ELT solutions. Does anyone know of other lightweight FLOSS data transfer tools that do one job well? Do you have a good FLOSS ETL or ELT solution? Let me know over on Mastodon.
This is a list of cross-platform portable Open Source databases.

XBase
https://sourceforge.net/projects/xdb/
DBase compatible database.

QDBM
https://dbmx.net/qdbm/
Works on several platforms. GNU gdbm compatible replacement.

SQLite
https://www.sqlite.org/index.html
Public domain SQL database by the developer of FOSSIL SCM.

PostgreSQL
https://www.postgresql.org/
High capacity SQL database.
We use the server status portion of PGAdmin3 often at work. Unfortunately, PGAdmin3 is no longer officially supported. The new PGAdmin4 does not have the server status feature. Since the PGAdmin3 software is Open Source, I have no issues continuing to use unsupported software as long as I can build and fix it myself. So, that's what I set about doing.

Before reinventing the wheel and creating all my fixes from scratch, I searched to see if other projects had made similar fixes to PGAdmin3. For a while, BigSQL supported an LTS version of PGAdmin3 and continued to supply executables and patches but they have since given up. From what I read, their patching was very minor and the patches the Debian distribution made were probably better done. BigSQL did offer a Windows executable which was very convenient. We typically run PGAdmin3 on Windows at work.

I found several projects at Github that attempted to continue to patch PGAdmin3. However, when I contacted the projects to see if they were interested in sharing efforts, most of the developers had given up on the idea of continuing to update PGAdmin3. They'd made the switch to other tools. I've searched through many other tools and built some from source out of curiosity but have yet to find something that replaces the functionality I use most with PGAdmin3.

I had decided to go ahead with my own fork of PGAdmin3 based on some of the fixes that others had made to continue to support it after official development stopped. One thing I really wanted was to be able to compile wxWidgets in a more standard way. WxWidgets developers made the switch to using STL for containers and there are other standard compile flags that most distributions typically use. PGAdmin wouldn't build with many of those settings out of the box. So, I went through and fixed all the warnings and errors that occurred while trying to compile PGAdmin3 with a more standard wxWidgets installation. I cherry-picked fixes to update PGAdmin3 to later versions of PostgreSQL based on some of the other forks. I added some fixes of my own for PostgreSQL updates as well. I planned to rework the build system so that it was easier for me to maintain and update. The idea was to switch to CDetect and makefiles rather than using GNU autotools, cmake or standard Visual C++ configuration files. Work on this stopped for a while and when I was ready to pick it up again, I decided to check once more to see if there were any useful forks that were active.

This time, I found there were new and active forks. I haven't had a chance to contact the maintainers and see if they'd like to collaborate on anything yet. However, the ability to use other projects with later versions of PostgreSQL makes the need for my updates much less urgent. I would still like to get a fork together than uses the latest version of wxWidgets and more standard compile settings. It's just not an absolute priority anymore.

I'd like to share links to two of the projects that I found that work with later versions of PostgreSQL and that provide executables for Windows:

https://vvs.ru/pg/index-en.html
https://github.com/levinsv/pgadmin3

If anyone else is still using PGAdmin3 and has ideas on future paths forward, I would be very interested in hearing those opinions. Some possible alternatives:
Fork just the server status piece possibly using another GUI and maintain that as a new program.
Collaborate with one of the active forks.
Continue with a fork that cherry picks the best features of other forks along with original patches.

PGAdmin3

Dec. 3rd, 2019 03:10 pm
We're using PostgreSQL at work. We've been using PGAdmin3 for a while now even though PGAdmin4 is available. PGAdmin4 is mainly browser based and can run slowly compared to the previous incarnation of PGAdmin. PGAdmin3 is a C++ program that uses the wxWidgets API and runs locally on a computer. PGAdmin3 is cross-platform, so it works on Windows, Linux, BSD and other systems where wxWidgets will run. My main issue the PGAdmin4 other than the slowness is the lack of the server status functionality which we use quite a bit with PGAdmin3. I did recently notice a dashboard option in PGAdmin4, but it doesn't give any real information on queries. The server status page basically gives a sortable table with the information from pg_stat_activity. I'd love to find a similar utility to provide this functionality, but so far, have not been able to. Suggestions would be greatly welcome.

Since I haven't been happy with PGAdmin4 and I do prefer PGAdmin3, why not keep running PGAdmin3? Debian has patches for PGAdmin3 to help keep it working with later versions of PostgreSQL. There are several forks of PGAdmin3 that attempted to keep it working once the official developers stopped development and switched to PGAdmin4. Combining some of these patches, I'm able to get a working version of PGAdmin3 built from source on Windows using wxWidgets (and the standard wxWidgets configuration settings I use on my system including --enable-stl). We needed a 64 bit version, so I built it with MinGW64 even though I typically prefer the original MinGW project and use it whenever possible. I should mention that the original PGAdmin3 source code never supported wxWidgets with STL enabled. I've also seen some reports of issues building for 64 bit systems instead of 32. Looking at the code, I can certainly see why those are issues. I went through and patched for both issues, including fixes for some problem areas that did not use best practices when converting from integers and longs to pointers and back. It's not perfect, but I have PGAdmin3 working with PostgreSQL 12 and providing the same functionality I used when I was working with PostgreSQL 9 databases.

I would love to find a fork that intends to actively continue development of PGAdmin3. Would be happy to add my efforts to such a project. If you know of a viable project, please advise. If there are no active forks, I intend to keep what I have running for as long as I need it at work. If others would like to help in that effort, it would be great to hear from them.

I also have PostgreSQL 12 built from source using MinGW64. We wanted to use pg_repack. I have not been able to find the pg_repack plug-in on Windows, so I built it from source as well. It needed some patching to compile successfully on Windows. I've been investigating what other PostgreSQL tools build on Windows using MinGW. So far, I have pgstats ( https://github.com/gleu/pgstats ) compiling. I may put in the effort to get pg_top working natively on Windows as well depending on whether we need the functionality or not. Suggestions of other cross-platform Open Source programs and utilities that would be useful with PostgreSQL would be greatly appreciated.
You contact me at: http://www.distasis.com/connect.htm
Write me if you want to help out.

April 2026

S M T W T F S
   1234
567891011
121314151617 18
19202122232425
2627282930  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 28th, 2026 09:38 am
Powered by Dreamwidth Studios