[GitHub] madlib pull request #339: Build: Add PG11 Support
Github user asfgit closed the pull request at: https://github.com/apache/madlib/pull/339 ---
[GitHub] madlib pull request #339: Build: Add PG11 Support
Github user orhankislal commented on a diff in the pull request: https://github.com/apache/madlib/pull/339#discussion_r237604025 --- Diff: src/ports/postgres/modules/kmeans/kmeans.sql_in --- @@ -766,15 +766,30 @@ BEGIN proc_fn_dist := fn_dist || '(DOUBLE PRECISION[], DOUBLE PRECISION[])'; -IF (SELECT prorettype != 'DOUBLE PRECISION'::regtype OR proisagg = TRUE -FROM pg_proc WHERE oid = proc_fn_dist) THEN -RAISE EXCEPTION 'Kmeans error: Distance function has wrong signature or is not a simple function.'; -END IF; -proc_agg_centroid := agg_centroid || '(DOUBLE PRECISION[])'; -IF (SELECT prorettype != 'DOUBLE PRECISION[]'::regtype OR proisagg = FALSE -FROM pg_proc WHERE oid = proc_agg_centroid) THEN -RAISE EXCEPTION 'Kmeans error: Mean aggregate has wrong signature or is not an aggregate.'; + +-- Handle PG11 pg_proc table changes --- End diff -- I tried this method but it requires casting `regprocedure` to `varchar`. This is allowed on PG versions after 8.3. On earlier versions, we have to use `textin` function. This means we will need another if check for GPDB4.3. ---
[GitHub] madlib pull request #339: Build: Add PG11 Support
Github user kaknikhil commented on a diff in the pull request: https://github.com/apache/madlib/pull/339#discussion_r237326034 --- Diff: src/ports/postgres/modules/utilities/utilities.py_in --- @@ -407,6 +407,15 @@ def set_client_min_messages(new_level): return old_msg_level # - +def is_less_than_pg11(schema_madlib, **kwargs): --- End diff -- I noticed that we have another function called `is_less_than_pg90` which has the same code as this function. We probably don't need the pg90 function anymore but it would be nice if the `is_less_than_pg11` function can be generalized to take in a major postgres version and then compare the current version with the passed major version. ---
[GitHub] madlib pull request #339: Build: Add PG11 Support
GitHub user orhankislal opened a pull request: https://github.com/apache/madlib/pull/339 Build: Add PG11 Support JIRA: MADLIB-1283 PG11 support required a number of minor changes in the code. - Change TRUE/FALSE to true/false - Use TupleDescAttr function instead of direct access. - Use prokind column instead of proisagg. We also added a function to check if the PG version is earlier than 11 as well as the necessary cmake files. You can merge this pull request into a Git repository by running: $ git pull https://github.com/madlib/madlib build/pg-11-support Alternatively you can review and apply these changes as the patch at: https://github.com/apache/madlib/pull/339.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #339 commit b63303c5bbcebeb82ab03694e4b3dade7d1827ab Author: Orhan Kislal Date: 2018-11-19T16:02:53Z Build: Add PG11 Support JIRA: MADLIB-1283 PG11 support required a number of minor changes in the code. - Change TRUE/FALSE to true/false - Use TupleDescAttr function instead of direct access. - Use prokind column instead of proisagg. We also added a function to check if the PG version is earlier than 11 as well as the necessary cmake files. ---