Re: Change pg_cancel_*() to ignore current backend

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change pg_cancel_*() to ignore current backend
Date: 2015-05-20 11:06:22
Message-ID: CAFcNs+qLNwYuiRE7nUPt94WY_9JnPndMmQOnAqv-svi3nKwfuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 20, 2015 at 2:40 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>
> On 5/19/15 9:19 PM, Fabrízio de Royes Mello wrote:
>>
>> We could add a second parameter to the current functions:
>> allow_own_pid DEFAULT false. To me that seems better than an
>> entirely separate set of functions.
>>
>>
>> +1 to add a second parameter to current functions.
>
>
> Instead of allow_own_pid, I went with skip_own_pid. I have the function
still returning true even when it skips it's own PID... that seems a bit
weird, but I think it's better than returning false. Unless someone thinks
it should return NULL, but I don't see that as any better either.
>

Isn't better use 'false' as the default value of the new parameter?

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2015-05-20 11:41:58 Re: Change pg_cancel_*() to ignore current backend
Previous Message Geoff Winkless 2015-05-20 09:49:14 Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint