Re: How to ensure a log-entry is created based on state of data in other tables - Mailing list pgsql-sql

From Andreas Joseph Krogh
Subject Re: How to ensure a log-entry is created based on state of data in other tables
Date
Msg-id VisenaEmail.6b.d76438498ddf3620.186371b8050@visena.app.internal.visena.net
Whole thread Raw
In response to 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>)
List pgsql-sql
På torsdag 09. februar 2023 kl. 17:44:25, skrev David G. Johnston <david.g.johnston@gmail.com>:
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.
 

Ah, this is what I'm looking for, I think.

 

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Attachment

pgsql-sql by date:

Previous
From: Rob Sargent
Date:
Subject: Re: How to ensure a log-entry is created based on state of data in other tables
Next
From: michele curioni
Date:
Subject: Could not serialize access due to read/write dependencies among transactions