Re: should I use postgresql arrays...

Lists: pgsql-sql
From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: should I use postgresql arrays...
Date: 2002-02-23 06:37:28
Message-ID: 3C7738A7.78485275@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Hi folks,

Using Postgresql array feature can siplify
lot of coding in my application layer as well as
database design , for example for storing checkbox
selections in a web page i need not have a
secondary table referencing the master one.

should i be using arrays for that?

My only concern is the SQL compliance , are arrays
part of standard 2/3 standards?

what if at a later date i decide to migrate my database
to another engine.


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: should I use postgresql arrays...
Date: 2002-02-23 17:21:19
Message-ID: Pine.LNX.4.30.0202231220370.689-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Rajesh Kumar Mallah writes:

> My only concern is the SQL compliance , are arrays
> part of standard 2/3 standards?

Arrays are in SQL99, but in a form that's not compatible with PostgreSQL's
current facilities.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Christopher Sawtell <csawtell(at)paradise(dot)net(dot)nz>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: should I use postgresql arrays...
Date: 2002-02-23 21:32:12
Message-ID: 20020223213743.78D43D26F2@deborah.paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Saturday 23 February 2002 07:37 pm, Rajesh Kumar Mallah wrote:
> Hi folks,
>
> Using Postgresql array feature can siplify
> lot of coding in my application layer as well as
> database design , for example for storing checkbox
> selections in a web page i need not have a
> secondary table referencing the master one.
>
> should i be using arrays for that?

It all depends, I have found array operations to be slow. So if you have just
a few elements, like less than 10 then arrays are ok, but with more e.g. 30+
elements, as in my case, imho the whole exercise is not really feasable. I am
going to re-design the schema to get rid of the arrays as soon as I have a
moment. Also the code around that part of PostgreSQL has not been visited for
a fair while and needs some polishing up. I'd avoid them.

> My only concern is the SQL compliance , are arrays
> part of standard 2/3 standards?
>
> what if at a later date i decide to migrate my database
> to another engine.

You will need to do a fair amount of work to get rid of them.

--
Sincerely etc.,
Christopher Sawtell