range_agg | Postgres extension to merge adjacent/overlapping ranges

 by   pjungwir C Version: Current License: MIT

kandi X-RAY | range_agg Summary

kandi X-RAY | range_agg Summary

range_agg is a C library. range_agg has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This is a Postgres extension that provides a range_agg aggregate function. It takes any [Postgres range type] and combines them, sort of like [string_agg, array_agg, json_agg, etc] There are three forms, depending on whether or not you want to permit gaps & overlaps. If you call range_agg(anyrange) (with just a single range parameter), then it will raise an error if a gap or overlap is detected, and on success it will return a single range.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              range_agg has a low active ecosystem.
              It has 14 star(s) with 3 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of range_agg is current.

            kandi-Quality Quality

              range_agg has 0 bugs and 0 code smells.

            kandi-Security Security

              range_agg has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              range_agg code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              range_agg is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              range_agg releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of range_agg
            Get all kandi verified functions for this library.

            range_agg Key Features

            No Key Features are available at this moment for range_agg.

            range_agg Examples and Code Snippets

            No Code Snippets are available at this moment for range_agg.

            Community Discussions

            QUESTION

            How to merge tsranges in to an array of tsranges in postgres?
            Asked 2021-May-21 at 13:54

            I currently trying merge continuous tsranges into one tsrange, but is at the same time running into an issue in case when there is a gap between two ranges, it gets ignored..

            The ranges are merged using the an Aggregate

            ...

            ANSWER

            Answered 2021-May-21 at 13:54

            From: https://www.postgresql.org/docs/12/sql-createaggregate.html

            How to merge ranges with aggregates
            • stype must be an array of tsranges. In the function that array must be mantained ordered and without intersections. i.e. ready to be returned
            • initcond must be an empty array (if you want that de range_agg returns [] if no rows or leave eat undefined if you want to return null in that case; I suggest the first).
            • sfunc must receive the state (the range array) and a new range. With the new range you must to iterate over the array until you find a buket or a intersecting range/s.

            Source https://stackoverflow.com/questions/67635908

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install range_agg

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/pjungwir/range_agg.git

          • CLI

            gh repo clone pjungwir/range_agg

          • sshUrl

            git@github.com:pjungwir/range_agg.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link