[GENERAL] Question about jsonb and data structures

2017-06-20 Thread Emilie Laffray
Hello, I have been playing with Postgresql recently with a large table and I have started looking at reducing the number of rows in that table. One idea to reduce the actual size, I thought I would "compress" the data structure into a JSON object (more on that later). The table is pretty

Re: [GENERAL] Schedule

2017-06-20 Thread Adrian Klaver
On 06/20/2017 01:23 PM, Alban Hertroys wrote: On 20 Jun 2017, at 18:46, Adrian Klaver wrote: Yes this could be become complicated if for no other reason then it is being driven from the customer end and there will need to be a process to verify and incorporate

Re: [GENERAL] Schedule

2017-06-20 Thread Alban Hertroys
> On 20 Jun 2017, at 18:46, Adrian Klaver wrote: > > On 06/20/2017 08:12 AM, Steve Clark wrote: >> On 06/20/2017 10:38 AM, Adrian Klaver wrote: >>> On 06/20/2017 07:00 AM, Steve Clark wrote: > >> We already have a monitoring system in place that has been in operation

Re: [GENERAL] Schedule

2017-06-20 Thread Rory Campbell-Lange
On 20/06/17, Steve Clark (steve.cl...@netwolves.com) wrote: > > 4) Equipment table keyed to location. > We already have a monitoring system in place that has been in operation circa > 2003. Just recently we have > added a new class of customer whose operation is not 24/7. > > I envision the

Re: [GENERAL] Schedule

2017-06-20 Thread Adrian Klaver
On 06/20/2017 08:12 AM, Steve Clark wrote: On 06/20/2017 10:38 AM, Adrian Klaver wrote: On 06/20/2017 07:00 AM, Steve Clark wrote: We already have a monitoring system in place that has been in operation circa 2003. Just recently we have added a new class of customer whose operation is not

Re: [GENERAL] Schedule

2017-06-20 Thread Melvin Davidson
On Tue, Jun 20, 2017 at 11:12 AM, Steve Clark wrote: > On 06/20/2017 10:38 AM, Adrian Klaver wrote: > > On 06/20/2017 07:00 AM, Steve Clark wrote: > >> On 06/20/2017 09:02 AM, Adrian Klaver wrote: > >>> On 06/20/2017 05:35 AM, Steve Clark wrote: > Hello, > >

Re: [GENERAL] Table Updatable By Trigger Only

2017-06-20 Thread Osahon Oduware
Hi Tom, Ok, thanks. On Tue, Jun 20, 2017 at 3:21 PM, Tom Lane wrote: > Osahon Oduware writes: > > The pg_trigger_depth() function solved the issue. Thanks a lot, you made > my > > day. > > If you start finding that that gets in your way for other

Re: [GENERAL] Schedule

2017-06-20 Thread Steve Clark
On 06/20/2017 10:38 AM, Adrian Klaver wrote: > On 06/20/2017 07:00 AM, Steve Clark wrote: >> On 06/20/2017 09:02 AM, Adrian Klaver wrote: >>> On 06/20/2017 05:35 AM, Steve Clark wrote: Hello, We have customers whose equipment we monitor. Some of the customers don't run a 24/7

Re: [GENERAL] Schedule

2017-06-20 Thread Adrian Klaver
On 06/20/2017 07:00 AM, Steve Clark wrote: On 06/20/2017 09:02 AM, Adrian Klaver wrote: On 06/20/2017 05:35 AM, Steve Clark wrote: Hello, We have customers whose equipment we monitor. Some of the customers don't run a 24/7 operation and turn their equipment off when the go home. We need to

Re: [GENERAL] Table Updatable By Trigger Only

2017-06-20 Thread Tom Lane
Osahon Oduware writes: > The pg_trigger_depth() function solved the issue. Thanks a lot, you made my > day. If you start finding that that gets in your way for other purposes, you might try making table A's trigger function be SECURITY DEFINER and owned by a role that has

Re: [GENERAL] Schedule

2017-06-20 Thread Steve Clark
On 06/20/2017 09:02 AM, Adrian Klaver wrote: > On 06/20/2017 05:35 AM, Steve Clark wrote: >> Hello, >> >> We have customers whose equipment we monitor. Some of the customers don't >> run a 24/7 operation >> and turn their equipment off when the go home. We need to create a schedule >> for them

Re: [GENERAL] Schedule

2017-06-20 Thread Adrian Klaver
On 06/20/2017 05:35 AM, Steve Clark wrote: Hello, We have customers whose equipment we monitor. Some of the customers don't run a 24/7 operation and turn their equipment off when the go home. We need to create a schedule for them of when we can ignore alerts from their equipment. We use

[GENERAL] Schedule

2017-06-20 Thread Steve Clark
Hello, We have customers whose equipment we monitor. Some of the customers don't run a 24/7 operation and turn their equipment off when the go home. We need to create a schedule for them of when we can ignore alerts from their equipment. We use postgresql in our monitoring environment to

Re: [GENERAL] Table Updatable By Trigger Only

2017-06-20 Thread Osahon Oduware
Hi Achilleas, The pg_trigger_depth() function solved the issue. Thanks a lot, you made my day. On Tue, Jun 20, 2017 at 12:58 PM, Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > On 20/06/2017 14:43, Osahon Oduware wrote: > > Hi All, > > I have a trigger on a PostGIS table (say table

Re: [GENERAL] Table Updatable By Trigger Only

2017-06-20 Thread Achilleas Mantzios
On 20/06/2017 14:43, Osahon Oduware wrote: Hi All, I have a trigger on a PostGIS table (say table A) that automatically updates another PostGIS table (say table B). Also, users connect to these tables (table A and B) using QGIS. However, I want the updates to table B to be done by the trigger

[GENERAL] Table Updatable By Trigger Only

2017-06-20 Thread Osahon Oduware
Hi All, I have a trigger on a PostGIS table (say table A) that automatically updates another PostGIS table (say table B). Also, users connect to these tables (table A and B) using QGIS. However, I want the updates to table B to be done by the trigger only (i.e. I don't want table B to be updated