pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Davies <scldad@sdc.com.au>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgreSQL.org, Marcin Mazurek - Multinet SA - Poznan <m.mazurek@multinet.pl>
Subject: Re: [SQL] arrays
Date: Sat, 04 Dec 1999 20:01:58 +1030
Message-ID: <199912040931.UAA01301@mustang.sdc.com.au> (raw)
In-Reply-To: <peter_e@gmx.net> <Pine.LNX.4.20.9912021935560.384-100000@localhost.localdomain>

Arrays do have a role in life: even in a "proper relational" world.

The classical examples are publications with multiple authors, ISBns, 
subjects, keywords etc.

Trying to fully normalise attributes like these leads to nonsensical and 
unusable database designs.

Cheers,
Stephen.

Peter Eisentraut <peter_e@gmx.net>  wrote:
> 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@gmx.net                   75262 Uppsala
> http://yi.org/peter-e/            Sweden
> 
> 
> 
> ************



-- 
========================================================================
Stephen Davies Consulting	    		      scldad@sdc.com.au
Adelaide, South Australia.     		      Voice: 08-8177 1595
Computing & Network solutions.	 	      Fax: 08-8177 0133





view thread (36+ messages)  latest in thread

Message-ID: <199912040931.UAA01301@mustang.sdc.com.au>
Permalink:  ../199912040931.UAA01301@mustang.sdc.com.au/
Also on:    postgresql.org/message-id/199912040931.UAA01301@mustang.sdc.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scldad@sdc.com.au, peter_e@gmx.net, m.mazurek@multinet.pl
  Subject: Re: [SQL] arrays
  In-Reply-To: <199912040931.UAA01301@mustang.sdc.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox