Re: arrays and references - Mailing list pgsql-general

From Travis Bauer
Subject Re: arrays and references
Date
Msg-id a7cmve$1kbc$1@jupiter.hub.org
Whole thread Raw
In response to arrays and references  (Mathieu Arnold <mat@mat.cc>)
List pgsql-general
Mathieu Arnold wrote:

> Hi
>
> I was wondering if there was a possibity to do something like this :
> create table a (a int primary key);
> create table b (b int primary key, a int[] references a(a));
> to avoid having to create another table to join the two tables.
>

You could create table a, table containing b and a, and a view c, which
refers to a and b, giving you the structure you want.

--
Travis Bauer


pgsql-general by date:

Previous
From: Mathieu Arnold
Date:
Subject: arrays and references
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: Postmaster processes running out of control?