So I’ve been neck deep in Postgresql/Postgis which has been a bit fun but a bit maddening.
One problems I ran into was “What is this column?”. Generally if a client hands me the database I start working with it and do a few things but I don’t worry about their columns in the database. People keep weird things for no reason and I’ve learned to stop asking so many questions on why.
In this case the client had a PDF describing the standard they were working toward. They also had some extra fields they needed for other applications. So I found myself constantly cracking open the PDF or emailing them going “Why is this and what is this?”. If only there was some metadata….
…….but they have this in a PDF and it is good:
So the comment command to the rescue. I’m going to attach the definition to the field: comment on column oirid is ‘leave your comment here’;
Yeah I know that was a lot to add for a comment and I did it all from the magic of the psql command. If I take a look at the table from QGIS using DB Manager now:
At this point I know what the column is even if this is a bit overkill. The question is now “Can I get this easy enough to get the client to document their database on the columns I don’t know?”
Actually that’s easy with DBmanager. I can go in and edit an existing table:
From here I can edit a column and make comments. If I write up some directions the client can jump in and start documenting the more scattered things they have the in database. They can even leave a comment on the table to describe why you have the table.
I’m constantly overlooking DBManager and the things you can do with it. In this case you can edit an existing table and add comments to help with documenting your database/project. You can import data into PostGIS. You can toss SQL against the database.