Lists: | pgsql-committerspgsql-hackers |
---|
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-01-20 03:32:48 |
Message-ID: | E1aLjVo-0003ow-45@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Fix assorted inconsistencies in GIN opclass support function declarations.
GIN had some minor issues too, mostly using "internal" where something
else would be more appropriate. I went with the same approach as in
9ff60273e35cad6e, namely preferring the opclass' indexed datatype for
arguments that receive an operator RHS value, even if that's not
necessarily what they really are.
Again, this is with an eye to having a uniform rule for ginvalidate()
to check support function signatures.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/dbe2328959e12701fade6b500ad411271923d6e4
Modified Files
--------------
contrib/hstore/hstore--1.3.sql | 12 ++++-----
contrib/intarray/intarray--1.1.sql | 8 +++---
contrib/tsearch2/tsearch2--1.0.sql | 4 +--
doc/src/sgml/gin.sgml | 48 ++++++++++++++++++++----------------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 22 ++++++++---------
6 files changed, 51 insertions(+), 45 deletions(-)
From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-02 20:38:48 |
Message-ID: | CAPpHfdsp5zNTt_pfHN6DWrE3=DcBikMZrwHbbbyLLcbxgK6emw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Jan 20, 2016 at 6:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> contrib/hstore/hstore--1.3.sql | 12 ++++-----
> contrib/intarray/intarray--1.1.sql | 8 +++---
> contrib/tsearch2/tsearch2--1.0.sql | 4 +--
>
Hmm... Is it correct to change function signatures without extension
version bump? pg_upgraded clusters would remain with old version of these
functions. Once we have instances with same extension version but with
different signatures of its functions, there is no correct way to refer
these functions in future. I think we should do the version bump in this
case.
The same for 9ff60273e35cad6e9d3a4adf59d5c2455afe9d9e.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-02 21:09:48 |
Message-ID: | 13088.1462223388@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> On Wed, Jan 20, 2016 at 6:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> contrib/hstore/hstore--1.3.sql | 12 ++++-----
>> contrib/intarray/intarray--1.1.sql | 8 +++---
>> contrib/tsearch2/tsearch2--1.0.sql | 4 +--
> Hmm... Is it correct to change function signatures without extension
> version bump? pg_upgraded clusters would remain with old version of these
> functions. Once we have instances with same extension version but with
> different signatures of its functions, there is no correct way to refer
> these functions in future. I think we should do the version bump in this
> case.
It doesn't really matter, though, because there simply isn't any need to
refer to these functions from SQL. They are only useful as opclass
support functions.
But this is likely moot anyway, because of the need to bump all the
contrib modules' versions in order to install parallel-safety labels on
their functions. (I wonder why that isn't on the open-items list.)
regards, tom lane
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-02 21:12:41 |
Message-ID: | CA+TgmoZd6Z-BHp6n_fp4yfS2qwnkvP7g+kCzAOOk4KZ8UgGxdA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Mon, May 2, 2016 at 5:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
>> On Wed, Jan 20, 2016 at 6:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> contrib/hstore/hstore--1.3.sql | 12 ++++-----
>>> contrib/intarray/intarray--1.1.sql | 8 +++---
>>> contrib/tsearch2/tsearch2--1.0.sql | 4 +--
>
>> Hmm... Is it correct to change function signatures without extension
>> version bump? pg_upgraded clusters would remain with old version of these
>> functions. Once we have instances with same extension version but with
>> different signatures of its functions, there is no correct way to refer
>> these functions in future. I think we should do the version bump in this
>> case.
>
> It doesn't really matter, though, because there simply isn't any need to
> refer to these functions from SQL. They are only useful as opclass
> support functions.
>
> But this is likely moot anyway, because of the need to bump all the
> contrib modules' versions in order to install parallel-safety labels on
> their functions. (I wonder why that isn't on the open-items list.)
Because it was argued by Noah that this was 9.7 work.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-02 21:12:59 |
Message-ID: | 20160502211259.rxgic2nwejihjgep@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 2016-05-02 17:09:48 -0400, Tom Lane wrote:
> But this is likely moot anyway, because of the need to bump all the
> contrib modules' versions in order to install parallel-safety labels on
> their functions. (I wonder why that isn't on the open-items list.)
I think the concensus when discussing that was that that'd essentially
be a "feature", and thus too late for 9.6. I'm a bit doubtful about
that position, but I also don't have a strong opinion the other way round.
From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-02 21:15:43 |
Message-ID: | 20160502211543.kklmnwnvjqn7mc2y@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 2016-05-02 17:12:41 -0400, Robert Haas wrote:
> On Mon, May 2, 2016 at 5:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> > But this is likely moot anyway, because of the need to bump all the
> > contrib modules' versions in order to install parallel-safety labels on
> > their functions. (I wonder why that isn't on the open-items list.)
>
> Because it was argued by Noah that this was 9.7 work.
Thinking about this again, I think that's not a good approach: It'll
mean we've to do very similar testing in 9.7 again. I'd rather label as
much as possible in one release.
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-03 02:58:07 |
Message-ID: | CA+TgmoYidRghQ2vaoRHdmYErfp4a9RhqrvbbEX86ffPLzFTafw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Mon, May 2, 2016 at 5:15 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2016-05-02 17:12:41 -0400, Robert Haas wrote:
>> On Mon, May 2, 2016 at 5:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
>> > But this is likely moot anyway, because of the need to bump all the
>> > contrib modules' versions in order to install parallel-safety labels on
>> > their functions. (I wonder why that isn't on the open-items list.)
>>
>> Because it was argued by Noah that this was 9.7 work.
>
> Thinking about this again, I think that's not a good approach: It'll
> mean we've to do very similar testing in 9.7 again. I'd rather label as
> much as possible in one release.
Yeah, I somewhat agree, but there's also no patch for this, yet.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-03 08:32:43 |
Message-ID: | CAPpHfdtKmQ=bTgs605TZ5UubEzfTa=c9xNkrHjg-OkOcdkOt4A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers Postg사설 토토SQL |
On Tue, May 3, 2016 at 12:09 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> > On Wed, Jan 20, 2016 at 6:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> contrib/hstore/hstore--1.3.sql | 12 ++++-----
> >> contrib/intarray/intarray--1.1.sql | 8 +++---
> >> contrib/tsearch2/tsearch2--1.0.sql | 4 +--
>
> > Hmm... Is it correct to change function signatures without extension
> > version bump? pg_upgraded clusters would remain with old version of
> these
> > functions. Once we have instances with same extension version but with
> > different signatures of its functions, there is no correct way to refer
> > these functions in future. I think we should do the version bump in this
> > case.
>
> It doesn't really matter, though, because there simply isn't any need to
> refer to these functions from SQL. They are only useful as opclass
> support functions.
>
What if we'll want to reuse some on these functions in new opclass?
Assumption that we don't need to refer these functions from SQL seems
dangerous to me.
If pg_upgraded instances are OK to leave with old function definitions, why
do we bother about new instances?
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-03 13:32:18 |
Message-ID: | 19752.1462282338@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> On Tue, May 3, 2016 at 12:09 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It doesn't really matter, though, because there simply isn't any need to
>> refer to these functions from SQL.
> What if we'll want to reuse some on these functions in new opclass?
What context do you imagine that happening in? Surely no other extension
would attempt to re-use them. If, say, hstore itself wanted to reuse
these functions, that would be in a new version of hstore--n.n.sql, so
there's no problem.
regards, tom lane
From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Date: | 2016-05-03 18:47:41 |
Message-ID: | CAPpHfdt=ASL5JbBqL9Va2Q4kN_dFzH0bpPm6jpch_VPycE3bOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Tue, May 3, 2016 at 4:32 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> > On Tue, May 3, 2016 at 12:09 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> It doesn't really matter, though, because there simply isn't any need to
> >> refer to these functions from SQL.
>
> > What if we'll want to reuse some on these functions in new opclass?
>
> What context do you imagine that happening in? Surely no other extension
> would attempt to re-use them. If, say, hstore itself wanted to reuse
> these functions, that would be in a new version of hstore--n.n.sql, so
> there's no problem.
>
Let's consider particular example: gin_extract_hstore() function.
In PostgreSQL 9.6 hstore 1.3 it's gin_extract_hstore(hstore, internal)
RETURNS internal.
In PostgreSQL 9.5 hstore 1.3 it's gin_extract_hstore(internal, internal)
RETURNS internal.
After pg_upgrade 9.5 => 9.6 it will be still gin_extract_hstore(internal,
internal) RETURNS internal.
Thus, in 9.6 hstore 1.3 we can meet either
1. gin_extract_hstore(internal, internal) RETURNS internal
2. gin_extract_hstore(hstore, internal) RETURNS internal
Then, if we want to reuse this function in hstore 1.4, we will need to
write a migration script hstore--1.3--1.4.sql. How can we refer
gin_extract_hstore() function from this script?
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company