Re: partitioned lookup table?

From: Vick Khera <vivek(at)khera(dot)org>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: partitioned lookup table?
Date: 2010-04-16 15:13:05
Message-ID: n2n2968dfd61004160813y6560a2f5z3ddd3e0679eafcb1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 16, 2010 at 10:48 AM, Andreas Kretschmer
<akretschmer(at)spamfence(dot)net> wrote:
> is it possible to partitionate a lookup-table? What i mean is:
>
> test=# create table foo(i int primary key);
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
> CREATE TABLE
> test=*# create table bla ( i int references foo);

You can have FK references from a partitioned table, but not to the
table. That is, you cannot have this FK reference since you are
partitioning foo. You can mimic the FK tests by writing your own
triggers that have knowledge of how you split the table, but they will
not be as efficient as a built-in FK test.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Mead 2010-04-16 15:26:19 Re: readline library not found
Previous Message Andreas Kretschmer 2010-04-16 14:48:18 partitioned lookup table?