Re: intarray - benefits over regular int[]?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: theconor(at)gmail(dot)com
Cc: "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: Re: intarray - benefits over regular int[]?
Date: 2017-08-21 20:02:24
Message-ID: CAKFQuwbJHb0EKmBkym63Exi7yYJZ+4g33=24itx9wt4t9Vj=Og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Aug 21, 2017 at 12:33 PM, <theconor(at)gmail(dot)com> wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/10/static/intarray.html
> Description:
>
​[...]​

> At the moment I am a little unclear whether intarray is effectively a
> deprecated module, or if it can still provide some distinct advantages -
> e.g. performance, features or just a handy syntax -- for new projects too?
>

​A quick skim of this and the generic array functions/operators
documentation shows that numerous functions and operators exist for
intarray that do not have equivalents in core. For that alone I'd say this
extension remains not-deprecated.

Its implied that it also performs better, ostensibly because the code need
only considered non-null integer arrays whereas the general functions have
to consider arrays of all types. I'm not aware of any recent benchmark
runs that would indicate whether improvements to arrays in recent versions
of PostgreSQL have narrowed or eliminated that gap.

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message rasmus 2017-08-22 07:27:54 Useful documentation removed from 9.5 docs
Previous Message theconor 2017-08-21 19:33:04 intarray - benefits over regular int[]?