Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghIAX-0007Ze-MN for pgsql-general@arkaria.postgresql.org; Wed, 09 Jan 2019 18:01:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ghIAW-0000ih-87 for pgsql-general@arkaria.postgresql.org; Wed, 09 Jan 2019 18:01:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghIAV-0000ia-TG for pgsql-general@lists.postgresql.org; Wed, 09 Jan 2019 18:01:32 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghIAS-0006cZ-Uh for pgsql-general@postgresql.org; Wed, 09 Jan 2019 18:01:31 +0000 Received: by mail-pf1-x42e.google.com with SMTP id i12so4011426pfo.7 for ; Wed, 09 Jan 2019 10:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=+0r2bRmEvIwyGVdBogbRZxZr9qRXI47y1uB1pNDu6O8=; b=HN6FCA3k8zqoYo5efphb9ztXov6epc3DiCxz7zXgfunBR15OtV5aGDHixpFQQk5eM9 siHrWiKx50X6JHuV2EBU8PiH3QFYy3zp+tD3fH5UhhfDx2sSUs61vtzbGM9O39cBXwiB pYUvOdDNyzKop4rjdACEX7vCIzGL4rljw9zRHk7wcjjfZZqZOxuJNSPqc65dZyHinNtq iWA6Ih+14MldA30T6sdee89D7GMMdVEbp3YlqmwldKMeINdoJ+onYlJieYgCT0H2fd+n hTRDAqZ+DZ38DAeDX+mDaDI3bm+Js44Yz6eBrlJJVUosOTnjgeDZuZgdIGfeDaByk0Sw mvzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=+0r2bRmEvIwyGVdBogbRZxZr9qRXI47y1uB1pNDu6O8=; b=KNpwonmwgf/piV8Gj0+ljpND5sARTFBTNEp9ny64SoOScPZvimzR9RIzT47PRd1wTR UjyJPUUIQNEFKHW6JIDjMv3aAo1Bj5Iw1tFQUMj0xMImc8zuuciHYfbyTu/xasEMgIKt dGroJBOGEtTbn6UGM3ibBQfzQBvhwH0Rhhy8Gd/UT0JrUFfdKN/POCdV0UgHLCp9Y+cc 14LxuIPqo/OxDvcyUOiAaRgNN+xZK/9eEQm/QiwHntzammqL3an+9+2KzwvLBRvXoeza REmjzR90fdYRaxB/Gooj6AkjOIkUvZY5hhTdAKsndMRXTJXahtghIBWK+G9Kep6cJpTG AnxA== X-Gm-Message-State: AJcUukdsjC0n/hY90CCNP+O2bAMAAK7SsxBXWKtA6es7vWB0uJrnb6qn sENaGXQ7WDeFrBtk6zcZju6aWzFh X-Google-Smtp-Source: ALg8bN7cEMfczec7Eh3ecDS57Pu93sR0jYYnZqBRJr9vzG4bj0hryc+bCqdmpWARyEioNmhQljo92g== X-Received: by 2002:a62:f54f:: with SMTP id n76mr6950058pfh.59.1547056885732; Wed, 09 Jan 2019 10:01:25 -0800 (PST) Received: from [10.104.134.14] ([155.100.47.6]) by smtp.gmail.com with ESMTPSA id 22sm95396152pgd.85.2019.01.09.10.01.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 10:01:24 -0800 (PST) Subject: Re: Pulling data from Postgres DB table for every 5 seconds. To: github kran , ronljohnsonjr@gmail.com Cc: "pgsql-general@postgresql.org" References: <46A9AD83-297C-4F4A-B198-10EBDE75D6D1@gmail.com> From: Rob Sargent Message-ID: <4616238f-75f9-fe48-0b5f-7b7978bd7daf@gmail.com> Date: Wed, 9 Jan 2019 11:01:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------BBDCCE9987F724D89EEC2F2E" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------BBDCCE9987F724D89EEC2F2E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 1/9/19 10:21 AM, github kran wrote: > Thanks for your reply Rob. Reading the below documentation link says > the EVENT trigger is only supported for DDL commands. Is it not correct ?. > > _1) https://www.postgresql.org/docs/9.6/event-trigger-definition.html _ > (An event trigger fires whenever the event with which it is associated > occurs in the database in which it is defined. Currently, the only > supported events are ddl_command_start, ddl_command_end, > table_rewrite and sql_drop. Support for additional events may be added > in future releases.). > 2) Doesnt the trigger slow down inserts/update we are doing to the > table ?. Does it slow down if we are reading the data using the API > when we have a trigger in place ?. > > Ah, right you are.  Are triggers off the table?  You would want to write the trigger function in some (trusted?) language with access to the outside --------------BBDCCE9987F724D89EEC2F2E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


On 1/9/19 10:21 AM, github kran wrote:
Thanks for your reply Rob. Reading the below documentation link says the EVENT trigger is only supported for DDL commands. Is it not correct ?.

1) https://www.postgresql.org/docs/9.6/event-trigger-definition.html 
(An event trigger fires whenever the event with which it is associated occurs in the database in which it is defined. Currently, the only supported events are ddl_command_start, ddl_command_end, table_rewrite and sql_drop. Support for additional events may be added in future releases.).
2) Doesnt the trigger slow down inserts/update we are doing to the table ?. Does it slow down if we are reading the data using the API when we have a trigger in place ?.


Ah, right you are.  Are triggers off the table?  You would want to write the trigger function in some (trusted?) language with access to the outside
--------------BBDCCE9987F724D89EEC2F2E--