pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik@2ndquadrant.fr>
To: Filip RembiaƂkowski <filip.rembialkowski@gmail.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: proposal: make NOTIFY list de-duplication optional
Date: Sun, 7 Feb 2016 16:37:30 +0100
Message-ID: <56B764BA.9070800@2ndquadrant.fr> (raw)
In-Reply-To: <CAP_rwwng-PBcVuNrerH=s7yHdZWFJ1-CYvqBYJv=0493PK+cgg@mail.gmail.com>
References: <CAP_rwwn2z0gPOn8GuQ3qDVS5+HgEcG2EzEOyiJtcA=vpDEhoCg@mail.gmail.com>
	<CA+TgmoYiKedu0vUXFQHKpJ1COmT7sNJd2KOLLtXQTQc6Ztgkug@mail.gmail.com>
	<7647.1454723392@sss.pgh.pa.us>
	<CADxJZo16qGNKhROpM-7hg6xgxNMarh2kBW=2suOCv+5EbPUfsw@mail.gmail.com>
	<CAP_rww=xRoBfbAqkywCHTs3jDxF9zknh1zLkrJKxZGykRtEHQg@mail.gmail.com>
	<56B7224C.4090807@2ndquadrant.fr>
	<CAP_rwwng-PBcVuNrerH=s7yHdZWFJ1-CYvqBYJv=0493PK+cgg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 02/07/2016 04:00 PM, Filip RembiaƂkowski wrote:
> On Sun, Feb 7, 2016 at 11:54 AM, Vik Fearing <vik@2ndquadrant.fr> 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



view thread (31+ messages)  latest in thread

Message-ID: <56B764BA.9070800@2ndquadrant.fr>
Permalink:  ../56B764BA.9070800@2ndquadrant.fr/
Also on:    postgresql.org/message-id/56B764BA.9070800@2ndquadrant.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: vik@2ndquadrant.fr, filip.rembialkowski@gmail.com
  Subject: Re: proposal: make NOTIFY list de-duplication optional
  In-Reply-To: <56B764BA.9070800@2ndquadrant.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox