Re: Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec
От | Alexander Korotkov |
---|---|
Тема | Re: Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Дата | |
Msg-id | CAPpHfdt=ASL5JbBqL9Va2Q4kN_dFzH0bpPm6jpch_VPycE3bOA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Re: pgsql: Fix assorted inconsistencies in GIN opclass support function dec (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-committers |
On Tue, May 3, 2016 at 4:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> On Tue, May 3, 2016 at 12:09 AM, Tom Lane <tgl@sss.pgh.pa.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
- gin_extract_hstore(internal, internal) RETURNS internal
- 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
В списке pgsql-committers по дате отправления: