Every year at this time, when I first start going outside to do the first yard work of the year, I’m reminded at how phenomenally out of shape I am. 😳

PostgreSQL – Disable Foreign Keys

PostgreSQL doesn’t have an explicit way to disable foreign keys. It does have a way to do so implicitly however because foreign keys are implemented via hidden triggers. If you need to disable foreign keys for a table load, etc it’s very easy:

ALTER TABLE <table name> DISABLE TRIGGER ALL;

It’s just as easy to reenable them:

ALTER TABLE <table name> ENABLE TRIGGER ALL;

And life is short. So if you want to be a writer, start writing (don’t tell yourself you have to finish something else first). If you want to help people, start helping people (don’t tell yourself you have to get rich first). If you want to be this or that, well, start—don’t chase another degree.

Because you never know if you’ll get another chance.