Re: [HACKERS] GSoC 2017: Foreign Key Arrays
There is a generic definition for any array added as part of https://commitfest.postgresql.org/10/708/ (it may be the reason for the duplicate error). I am not sure what your change is but I would review the above just in case. There is also a defect with a misleading error that is still being triggered for UUID arrays. Enrique On Mon, Jul 17, 2017 at 4:25 PM Mark Rofailwrote: > On Wed, Jul 12, 2017 at 12:53 AM, Alvaro Herrera > wrote: >> >> We have one opclass for each type combination -- int4 to int2, int4 to >> int4, int4 to int8, etc. You just need to add the new strategy to all >> the opclasses. > > > I tried this approach by manually declaring the operator multiple of > times in pg_amop.h (src/include/catalog/pg_amop.h) > > so instead of the polymorphic declaration > DATA(insert ( 2745 2277 2283 5 s 6108 2742 0 )); /* anyarray @>> > anyelem */ > > multiple declarations were used, for example for int4[] : > DATA(insert ( 2745 1007 20 5 s 6108 2742 0 )); /* int4[] @>> int8 */ > DATA(insert ( 2745 1007 23 5 s 6108 2742 0 )); /* int4[] @>> int4 */ > DATA(insert ( 2745 1007 21 5 s 6108 2742 0 )); /* int4[] @>> int2 */ > DATA(insert ( 2745 1007 1700 5 s 6108 2742 0 ));/* int4[] @>> numeric */ > > However, make check produced: > could not create unique index "pg_amop_opr_fam_index" > Key (amopopr, amoppurpose, amopfamily)=(6108, s, 2745) is duplicated. > > Am I implementing this the wrong way or do we need to look for another > approach? > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers >
Re: [HACKERS] Allowing GIN array_ops to work on anyarray
Great, given it does not apply to this patch, then all the other tests passed and the change looks good. Thank you, Enrique On Mon, Sep 26, 2016 at 6:27 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > Enrique Meneses <emmene...@gmail.com> writes: > > I was not sure what "Spec compliant means"... so I did not select as > tested or passed. What should I do to validate that this change is "Spec > compliant"? > > It's irrelevant to this patch, AFAICS. The SQL standard doesn't discuss > indexes at all, much less legislate on which operator classes ought to > exist for GIN indexes. > > regards, tom lane >
Re: [HACKERS] Allowing GIN array_ops to work on anyarray
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed I built and installed (make world / make install-world) github branch REL9_6_STABLE and applied the patch (patch -p1 < patch/gin-true-anyarray-opclass-1.patch). I then upgraded my development database (postgres 9.5) using pg_upgrade. This database has one table with an UUID array gin index. The database was upgraded correctly to postgresql 9.6 and I was able to successfully connect to it from a web application which uses the database. There were no conflicts so I expect others to be able to upgrade without issues. I then dropped the database and re-created it... I made sure that I no longer used my prior operator class definition. I re-started my web application and confirmed it works. This verifies the feature works as designed. The following is no longer required: CREATE OPERATOR CLASS _uuid_ops DEFAULT FOR TYPE _uuid USING gin AS OPERATOR 1 &&(anyarray, anyarray), OPERATOR 2 @>(anyarray, anyarray), OPERATOR 3 <@(anyarray, anyarray), OPERATOR 4 =(anyarray, anyarray), FUNCTION 1 uuid_cmp(uuid, uuid), FUNCTION 2 ginarrayextract(anyarray, internal, internal), FUNCTION 3 ginqueryarrayextract(anyarray, internal, smallint, internal, internal, internal, internal), FUNCTION 4 ginarrayconsistent(internal, smallint, anyarray, integer, internal, internal, internal, internal), STORAGE uuid; I also ran "make installcheck-world" and all the tests passed. The new status of this patch is: Waiting on Author -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Allowing GIN array_ops to work on anyarray
I was not sure what "Spec compliant means"... so I did not select as tested or passed. What should I do to validate that this change is "Spec compliant"? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Allowing GIN array_ops to work on anyarray
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed I am resending this due to an earlier error message from the mailing list: - These are my comments for the review of https://commitfest.postgresql.org/10/708/ I built and installed (make world / make install-world) github branch REL9_6_STABLE and applied the patch (patch -p1 < patch/gin-true-anyarray-opclass-1.patch). I then upgraded my development database (postgres 9.5) using pg_upgrade. This database has one table with an UUID array gin index. The database was upgraded correctly to postgresql 9.6 and I was able to successfully connect to it from a web application which uses the database. There were no conflicts so I expect others to be able to upgrade without issues. I then dropped the database and re-created it... I made sure that I no longer used my prior operator class definition. I re-started my web application and confirmed it works. This verifies the feature works as designed. The following is no longer required: CREATE OPERATOR CLASS _uuid_ops DEFAULT FOR TYPE _uuid USING gin AS OPERATOR 1 &&(anyarray, anyarray), OPERATOR 2 @>(anyarray, anyarray), OPERATOR 3 <@(anyarray, anyarray), OPERATOR 4 =(anyarray, anyarray), FUNCTION 1 uuid_cmp(uuid, uuid), FUNCTION 2 ginarrayextract(anyarray, internal, internal), FUNCTION 3 ginqueryarrayextract(anyarray, internal, smallint, internal, internal, internal, internal), FUNCTION 4 ginarrayconsistent(internal, smallint, anyarray, integer, internal, internal, internal, internal), STORAGE uuid; I also ran "make installcheck-world" and all the tests passed. I am not sure what "Spec compliant means"... so I did not select as tested or passed. What should I do to validate that this change is "Spec compliant"? The new status of this patch is: Waiting on Author -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers