Re: [SQL] arrays

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Marcin Mazurek - Multinet SA - Poznan <m(dot)mazurek(at)multinet(dot)pl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] arrays
Date: 1999-12-04 02:23:30
Message-ID: Pine.LNX.4.20.9912021935560.384-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Don't use arrays. They look very promising but they aren't. Most of these
kind of questions can be resolved by designing a proper relational
database schema.

On 1999-12-01, Marcin Mazurek - Multinet SA - Poznan mentioned:

> Hi,
> I have a table: orders (id int, val INT4[][]);. The question is how to
> select in separate rows values from particular id?
>
> example:
> insert into orders values(1,'{{1,1},{1,4},{2,3}}');
> select val from orders where id=1; gives me:
> val
> -------------------
> {{1,2},{1,4},{2,3}}
>
> How can I make from it to columned table with first and second int
> separated?
>
> mazek
>
>
>
> ************
>
>

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

  • arrays at 1999-12-01 22:34:02 from Marcin Mazurek - Multinet SA - Poznan

Browse pgsql-sql by date

  From Date Subject
Next Message Stephen Davies 1999-12-04 09:31:58 Re: [SQL] arrays
Previous Message Tom Lane 1999-12-03 23:00:32 Re: [SQL] Wierd stuff