prokind column (was Re: [HACKERS] SQL procedures)

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: prokind column (was Re: [HACKERS] SQL procedures)
Date: 2018-02-24 15:02:10
Message-ID: aef5d870-6452-475f-9bbc-0a3c71b9e8cb@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On 1/9/18 13:08, Peter Eisentraut wrote:
> On 1/2/18 17:47, Peter Eisentraut wrote:
>> On 1/2/18 11:47, Tom Lane wrote:
>>> +1 --- seems like a new bool column is the thing. Or may we should merge
>>> "proisprocedure" with proisagg and proiswindow into an enum prokind?
>>> Although that would break some existing client-side code.
>>
>> prokind sounds good. I'll look into that.
>
> Here is a patch set for that. (I just kept the pg_proc.h changes
> separate for easier viewing.) It's not quite complete; some frontend
> code still needs adjusting; but the idea is clear.
>
> I think this would be a pretty good change. It doesn't appear to save a
> ton amount of code, although a couple of cases where inconsistent
> settings of proisagg and proiswindow had to be handed could be removed.
> Because window functions are a separate kind in pg_proc but not in the
> object address system, inconsistencies will remain in the system, but I
> guess that's just the way it is.

Here is this patch updated. The client changes are now complete and all
the tests pass. I have also rolled back the places where the code used
prorettype to detect procedures and replaced this by the new facility.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Add-prokind-column-replacing-proisagg-and-proiswi.patch text/plain 52.0 KB
v2-0002-pg_proc.h-updates.patch.gz application/x-gzip 80.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-02-24 15:12:10 Re: check error messages in SSL tests
Previous Message Robert Haas 2018-02-24 14:08:07 Re: [HACKERS] WIP: Aggregation push-down