Re: How to ensure a log-entry is created based on state of data in other tables
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Andreas Joseph Krogh <andreas@visena.com>
Cc: pgsql-sql@lists.postgresql.org
Date: 2023-02-09T16:44:25Z
Lists: pgsql-sql
On Thu, Feb 9, 2023 at 12:24 AM Andreas Joseph Krogh <andreas@visena.com> wrote: > Is there a better way, using some extra tables to do bookkeeping can the > have constraints ensuring this business-requirement? > > > Every time an activity newly becomes "Not Done" increment a "not done seen counter" and likewise with a "done seen counter". Whenever the former is greater than the later you have one or more not done activities. David J.