Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aSRQV-00087N-L4 for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Feb 2016 15:39:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aSRQU-0004fT-Vb for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Feb 2016 15:39:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aSRPB-0003Cp-6Q for pgsql-hackers@postgresql.org; Sun, 07 Feb 2016 15:37:41 +0000 Received: from fr1.2ndquadrant.fr ([2001:41d0:2:127c::1]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aSRP8-0002OP-47 for pgsql-hackers@postgresql.org; Sun, 07 Feb 2016 15:37:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by fr1.2ndquadrant.fr (Postfix) with ESMTP id 50F536448F; Sun, 7 Feb 2016 16:37:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at fr1.2ndquadrant.fr Received: from fr1.2ndquadrant.fr ([127.0.0.1]) by localhost (fr1.2ndquadrant.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WACPLYpj93YQ; Sun, 7 Feb 2016 16:37:34 +0100 (CET) Received: from [192.168.0.3] (ath91-3-88-167-161-184.fbx.proxad.net [88.167.161.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: charles) by fr1.2ndquadrant.fr (Postfix) with ESMTPSA id 035D55FCF0; Sun, 7 Feb 2016 16:37:33 +0100 (CET) Subject: Re: proposal: make NOTIFY list de-duplication optional To: =?UTF-8?Q?Filip_Rembia=c5=82kowski?= References: <7647.1454723392@sss.pgh.pa.us> <56B7224C.4090807@2ndquadrant.fr> Cc: Pgsql Hackers From: Vik Fearing Message-ID: <56B764BA.9070800@2ndquadrant.fr> Date: Sun, 7 Feb 2016 16:37:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 02/07/2016 04:00 PM, Filip RembiaƂkowski wrote: > On Sun, Feb 7, 2016 at 11:54 AM, Vik Fearing wrote: >> I seem to remember some discussion about not using DEFAULT parameters in >> system functions so you should leave the old function alone and create a >> new function with your use_all parameter. I don't recall the exact >> reason why so hopefully someone else will enlighten me. > > I'm quite new to this; how do I pinpoint proper OID for a new catalog > object (function, in this case)? > Is there a better way than browsing fmgr files and guessing next available oid? There is a shell script called `unused_oids` in src/include/catalog/. >> There is also no mention in the documentation about what happens if I do: >> >> NOTIFY ALL chan, 'msg'; >> NOTIFY ALL chan, 'msg'; >> NOTIFY DISTINCT chan, 'msg'; >> NOTIFY ALL chan, 'msg'; >> >> Without testing, I'd say I'd get two messages, but it should be >> explicitly mentioned somewhere. > > If it's four separate transactions, LISTEN'er should get four. The question was for one transaction, I should have been clearer about that. > If it's in one transaction, LISTEN'er should get three. This is surprising to me, I would think it would get only two. What is your rationale for three? Compare with the behavior of: select 1 union all select 1 union distinct select 1 union all select 1; -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers