Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Instead of deleting account, NYT appends ‘1000’ to username and email address. Parent comment
It can get complex (for example foreign keys need special handling).
One option is table partitioning: https://www.2ndquadrant.com/en/blog/postgresql-12-foreign-ke...
You partition the table based on deleted or not, and then query either both tables together, or just the active table.
It can get complex (for example foreign keys need special handling).
One option is table partitioning: https://www.2ndquadrant.com/en/blog/postgresql-12-foreign-ke...
You partition the table based on deleted or not, and then query either both tables together, or just the active table.