Quick Hit: Don’t Do This In Postgresql

Steven NgDaily Debug BlogLeave a Comment

The Postgresql wiki has an interesting page called “Don’t Do This“.

On this page, there’s a laundry list of things (some more curious than others) of things that you shouldn’t do.

For example, Postgresql has a neat feature (on paper) called rules. But the official stance is that you should probably use a trigger instead.

Also, you shouldn’t use uppercase characters in table names. If you do, you’re going to have to wrap all entity names in quotes. This is an annoying one if you’re coming from SQL Server, which is lenient about these things. The first time I got burned by this was moving data from SQL Server to Postgresql using Pentaho. I lazily used Pentaho’s target table creation functionality, and because the source had mixed case entity names, it caused all sorts of problems.

It seems like you’ll run into a lot of these no-no’s if you’ve got muscle memory from other database engines, but if you use Postgresql in any significant manner, you should read this page.

Other articles by this author:

Please follow and like us:
error

Leave a Reply

Your email address will not be published. Required fields are marked *