Search Postgresql Archives

Re: partitioned lookup table?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 16, 2010 at 10:48 AM, Andreas Kretschmer
<akretschmer@xxxxxxxxxxxxx> 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.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux