Thread: PostgreSQL Array Use

PostgreSQL Array Use

From
dmp
Date:
Hello,
The project MyJSQLView will provided basic support
for array types in PostgreSQL at the next release.
Information is desired from anyone that uses arrays
in PostgreSQL to effect this support. Just a couple
of questions.

1. What Size, <10 or 100's, 1000's of elements?
2. Single or Multi-Dimensional?
3. What data types?

Any input would be welcome.
Thanks,
danap.

Re: PostgreSQL Array Use

From
Karsten Hilbert
Date:
On Mon, Mar 03, 2008 at 10:42:50AM -0700, dmp wrote:

> The project MyJSQLView will provided basic support
> for array types in PostgreSQL at the next release.

> Information is desired from anyone that uses arrays
> in PostgreSQL to effect this support.

> 1. What Size, <10 or 100's, 1000's of elements?

    <50 elements

> 2. Single or Multi-Dimensional?

    single

> 3. What data types?

    text

Karsten
wiki.gnumed.de
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

Re: PostgreSQL Array Use

From
Josh Trutwin
Date:
On Mon, 03 Mar 2008 10:42:50 -0700
dmp <danap@ttc-cmc.net> wrote:

> Hello,
> The project MyJSQLView will provided basic support
> for array types in PostgreSQL at the next release.
> Information is desired from anyone that uses arrays
> in PostgreSQL to effect this support. Just a couple
> of questions.
>
> 1. What Size, <10 or 100's, 1000's of elements?

100's

> 2. Single or Multi-Dimensional?

Single

> 3. What data types?

Integers and Characters

> Any input would be welcome.
> Thanks,
> danap.
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 2: Don't 'kill -9' the
> postmaster
>

Re: PostgreSQL Array Use

From
Erik Jones
Date:
On Mar 3, 2008, at 12:42 PM, Josh Trutwin wrote:

> On Mon, 03 Mar 2008 10:42:50 -0700
> dmp <danap@ttc-cmc.net> wrote:
>
>> Hello,
>> The project MyJSQLView will provided basic support
>> for array types in PostgreSQL at the next release.
>> Information is desired from anyone that uses arrays
>> in PostgreSQL to effect this support. Just a couple
>> of questions.
>>
>> 1. What Size, <10 or 100's, 1000's of elements?
>
> 100's
>
>> 2. Single or Multi-Dimensional?
>
> Single
>
>> 3. What data types?
>
> Integers and Characters


Where are you getting this information.  Here's the first three
sentences from the manual's chapter on arrays:

" PostgreSQL allows columns of a table to be defined as variable-
length multidimensional arrays. Arrays of any built-in or user-
defined base type can be created. (Arrays of composite types or
domains are not yet supported, however.)"

In addition, wrt question #1, I haven't found anything specifying any
kind of limit on the number of elements and array field can hold.  I
would thus expect that you'd be more limited by 1G field size limit
via TOAST, i.e. the total size of the elements would be capped at 1G
which would be a different number of elements for different types.

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com




Re: PostgreSQL Array Use

From
Karsten Hilbert
Date:
On Mon, Mar 03, 2008 at 01:22:17PM -0600, Erik Jones wrote:

> Where are you getting this information.
IMO the OP wanted to know how people *use* arrays, not how
one *can* use arrays.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

Re: PostgreSQL Array Use

From
Josh Trutwin
Date:
On Mon, 3 Mar 2008 20:48:55 +0100
Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:

> On Mon, Mar 03, 2008 at 01:22:17PM -0600, Erik Jones wrote:
>
> > Where are you getting this information.
> IMO the OP wanted to know how people *use* arrays, not how
> one *can* use arrays.

That was my thought, sort of a poll.  Hopefully OP isn't confused
now.  :)

Josh

Re: PostgreSQL Array Use

From
Erik Jones
Date:
On Mar 3, 2008, at 2:05 PM, Josh Trutwin wrote:

> On Mon, 3 Mar 2008 20:48:55 +0100
> Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
>
>> On Mon, Mar 03, 2008 at 01:22:17PM -0600, Erik Jones wrote:
>>
>>> Where are you getting this information.
>> IMO the OP wanted to know how people *use* arrays, not how
>> one *can* use arrays.
>
> That was my thought, sort of a poll.  Hopefully OP isn't confused
> now.  :)

Ah, I sure was then :)

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com




Re: PostgreSQL Array Use

From
eKIK
Date:
 > 1. What Size, <10 or 100's, 1000's of elements?

        < 100 elements

> 2. Single or Multi-Dimensional?

        2-dimensional

> 3. What data types?

        integers

Re: PostgreSQL Array Use

From
TJ O'Donnell
Date:
I use arrays of integers, double or numeric, and text.
They are 1 or 2 dimensional.
They are usually limited to <100 elements in
one dimension and <10 in the other.

TJ O'Donnell
http://www.gnova.com

Re: PostgreSQL Array Use

From
dmp
Date:
I was slightly confused. I'm really trying to identify what type
of support the project should provide to array types. Just from
the input so far, it looks like more needs to be done. If 100's to
1000's of elements are in an array type, the application is going
to have some problems. Presently it will adequately handle less
then 10 or 20 elements in multi-dimensional arrays, without
much problem with adding, editing, & viewing, but 100s to 1000s
of elements need a more robust & easy method to view and edit
elements. The data type of the array is not a real problem, except
bytea and some of the geometry types which have some specific
input form requirements. Text might be a problem if the byte
size is large.
danap.

On Mar 3, 2008, at 2:05 PM, Josh Trutwin wrote:

> On Mon, 3 Mar 2008 20:48:55 +0100
> Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
>
>> On Mon, Mar 03, 2008 at 01:22:17PM -0600, Erik Jones wrote:
>>
>>> Where are you getting this information.
>>
>> IMO the OP wanted to know how people *use* arrays, not how
>> one *can* use arrays.
>
>
> That was my thought, sort of a poll.  Hopefully OP isn't confused
> now.  :)


Ah, I sure was then :)

Erik Jones