Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecYoD-0002dP-Ry for pgsql-general@arkaria.postgresql.org; Fri, 19 Jan 2018 15:42:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecYoD-0001jl-Bo for pgsql-general@arkaria.postgresql.org; Fri, 19 Jan 2018 15:42:25 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ecYm9-0007vc-OW for pgsql-general@lists.postgresql.org; Fri, 19 Jan 2018 15:40:17 +0000 Received: from [2001:41c9:1:41d::10] (helo=srv01.teladesign.ie) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ecYm6-0005Uj-TX for pgsql-general@postgresql.org; Fri, 19 Jan 2018 15:40:17 +0000 Received: from [93.107.231.214] (helo=[192.168.1.129]) by srv01.teladesign.ie with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ecYm0-0005GW-Kk; Fri, 19 Jan 2018 15:40:10 +0000 Reply-To: rod@iol.ie To: hmidi slim , pgsql-general@postgresql.org References: From: Raymond O'Donnell Message-ID: <2f4c0da8-9ae8-4262-667e-538d5f6f67ec@iol.ie> Date: Fri, 19 Jan 2018 15:40:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 93.107.231.214 X-SA-Exim-Mail-From: rod@iol.ie X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on srv01.teladesign.ie X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Subject: Re: Notify client when a table was full X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on srv01.teladesign.ie) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:41c9:1:41d::10 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 19/01/18 15:34, hmidi slim wrote: > Hi, > I'm looking for a function in postgresql which notify the client if a > table was full or not.So I found the function Notify > https://www.postgresql.org/docs/9.0/static/sql-notify.html. > This function send a notification when a new action was done to the > table. Is there a way to send a notification only  when the table was > full and no future actions (insertion of new rows for examples) will be > done. I was connected to an external api and saving the data received > from it to a postgres database and I want to be notified when the table > was full and no rows will be inserted. Does it realizable or Should I > create a trigger and listens for every insertion and notify the client? How do you define "full"? Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie