From: | Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> |
---|---|
To: | "Lavrenz, Steven M" <slavrenz(at)purdue(dot)edu> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Populating missing dates in postgresql data |
Date: | 2015-03-27 10:41:11 |
Message-ID: | 20150327114111.6ebf2188645a92866e1e0c03@wanadoo.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 26 Mar 2015 00:25:09 +0000
"Lavrenz, Steven M" <slavrenz(at)purdue(dot)edu> wrote:
> I have a second table (TABLE B) with all of the object_ids and channels that are supposed to be reporting in each day. For cases where a certain channel does not check in, I want to add a column that indicates the comm failure.
Not sure if your context allows it, but if you can change your program's logic, it might be easier to :
-add a boolean field (e.g. 'checked') to table B, set to false
-whenever an object checks in do 'update table B set checked = true where object_id = X and channel = Y'
-run a cron job once a day that
-runs 'select * from B where checked = false' and stores results somewhere
-resets B with 'update B set checked = false'
--
Salutations, Vincent Veyron
https://libremen.com/
Legal case, contract and insurance claim management software
From | Date | Subject | |
---|---|---|---|
Next Message | Jacobo Vazquez | 2015-03-27 11:13:51 | SSPI authentication ASC_REQ_REPLAY_DETECT flag |
Previous Message | Erik Jones | 2015-03-26 21:21:36 | 9.4's limited logical replication, anyone actually used it, yet? |