Cascade Dropping Tables in PostgreSQL

Dropping tables with dependent objects is usually a tricky task. If the database is normalized, usually foreign keys will prevent the drop from occurring. Other objects such as views can also prevent dropping the object. It’s a very good thing these drops fail. We don’t want to accidentally blow away those necessary objects. However, if…

Generating a Series with PostgreSQL

I’ll preface this by saying that I don’t work with PostgreSQL too often, but this is one of the most useful functions I’ve seen. There are many times working with data where we need to use a “Numbers” or a “Tally” table to generate a series of data to perform something in a set-based manner…