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:
- Postgresql Tip: Getting rid of redundant rows using DELETE USING
- Get To Know Extrata, Episode 2: Database Writeback
- Quick Hit: Craig Kerstiens’s Postgresql Hidden Gems
- Easy Database Version Control (a.k.a. migrations) with Flyway
- Quick Hit: Public Sans, A Free Font That’s Great for Reporting