pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vivek Khera <vivek@khera.org>
To: pgsql-sql@postgresql.org
Subject: Re: Partitioning and Foreign Keys
Date: Thu, 8 Nov 2007 11:45:45 -0500
Message-ID: <AB566F36-24DC-4A53-9D3E-F5893BC33C25@khera.org> (raw)
In-Reply-To: <87ejf57v28.fsf@ttnet.net.tr>
References: <87ejf57v28.fsf@ttnet.net.tr>


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.




view thread (2+ messages)

Message-ID: <AB566F36-24DC-4A53-9D3E-F5893BC33C25@khera.org>
Permalink:  ../AB566F36-24DC-4A53-9D3E-F5893BC33C25@khera.org/
Also on:    postgresql.org/message-id/AB566F36-24DC-4A53-9D3E-F5893BC33C25@khera.org

 · 

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: vivek@khera.org
  Subject: Re: Partitioning and Foreign Keys
  In-Reply-To: <AB566F36-24DC-4A53-9D3E-F5893BC33C25@khera.org>

* 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