Re: Partitioning and Foreign Keys

From: Vivek Khera <vivek(at)khera(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Partitioning and Foreign Keys
Date: 2007-11-08 16:45:45
Message-ID: AB566F36-24DC-4A53-9D3E-F5893BC33C25@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Nov 4, 2007, at 12:57 PM, Volkan YAZICI wrote:

> major bottleneck. I planned to partition this table, but I learnt that
> PostgreSQL doesn't allow referencing views. Does anybody have any
> suggestions?
>

I can envision writing your own custom trigger instead of using the
stock FK trigger that knows which sub-table to check for the FK
reference. Then add that as an insert/update trigger on your
referencing table.

I will be investigating this approach in the next few months; right
now I don't have need for this particular case.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oliveiros Cristina 2007-11-08 17:56:14 Obtaining the primary key of the record just inserted
Previous Message Tom Lane 2007-11-07 15:35:08 Re: EPOCH TIMESTAMP Conversion Problem