Leave a Comment

Mar 20, 2019 | Default

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’;

Command line magic

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:

View Comments in QGIS.

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:

Edit your columns in DB Manager

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.

Comment your columns

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.

You may also like

The Big TN Conference Pt 2

The Big TN Conference Pt 2

...aaand I'm back home. So I've been to a lot of conferences. Some Good. Some Bad. This one was good. Better than I had hoped. So what was my main takeaway from it? They keynotes were a great contrast of people/computers. OSM is all about the people. I had no clue how...

Almost 11 months later

Almost 11 months later

I've been trying to write my thoughts down more and have just been lost in life. The last 30 days have had me in Oak Ridge, Murfreesboro, and Reston Virginia. Yet another reason I mumble I really need to cut down on traveling. Which reminds me I need to discuss...

Updates on the TN911 side of things

Updates on the TN911 side of things

News of the weird...or possibly normal. . I hit two "almost a problem" problems with the longest running install of this system: I need to update it which means changing names on three of the layers. I expect much screaming when this happens. I already did a dry run...