Nullable vs Non-Nullable Columns and Adding Not Null Without Downtime in PostgreSQL

  • Comments posted to this topic are about the item Nullable vs Non-Nullable Columns and Adding Not Null Without Downtime in PostgreSQL

  • An issue that can arise with non nullable columns is that if at a later time you realise you need them to be null after all , due to some edge case, then you have lots of updating to do.

    A good example of this is the new laws coming on the books in California and Europe on data privacy. We may think we need to have first and last name and other fields to be required, until a new law comes into effect on data privacy. Here would be a good place to define a gray area. That is, to ask though we dont have a immediate need to delete certain personally identifiable information now,... can that channge in the future. If this is foreseeable, then a constraint on the table may be a better option. These can simply be dropped at the right time.

    ----------------------------------------------------

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply