Re: Change pg_cancel_*() to ignore current backend

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <fabriziomello(at)gmail(dot)com>, "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 23:36:11
Message-ID: 555D1A6B.3050306@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 5/20/15 8:47 AM, Tom Lane wrote:
> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
>> On 5/19/15 9:19 PM, Fabrízio de Royes Mello wrote:
>>> +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.
>
> The implementation would probably be considerably simpler if you treated
> these as separate functions at the SQL/C level, ie overload rather than
> try to treat the added parameter as having a default.

AFAICS that's just a minor change to what I'm doing in
catalog/system_view.sql and nothing else, so I'm not seeing the win.
What am I missing?

Now that we have default parameters my preference is to use them if for
no other reason than reduce bloat in \df...

BTW, is there a reason we're putting function SQL in that file other
than it was a convenient place?
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-05-20 23:46:12 Re: Disabling trust/ident authentication configure option
Previous Message Michael Banck 2015-05-20 23:09:26 Re: Disabling trust/ident authentication configure option