pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: CHECK constraint on multiple tables
Date: Mon, 14 Sep 2009 19:00:37 +0200
Message-ID: <h8lsrk$g9g$1@ger.gmane.org> (raw)
In-Reply-To: <4AAE5141.70300@megafon.hr>
References: <4AAE43F8.4000107@megafon.hr>
	<15921.1252937895@sss.pgh.pa.us>
	<4AAE5141.70300@megafon.hr>

Mario Splivalo wrote on 14.09.2009 16:20:
>> Have you considered refactoring so there's only one table?
> 
> Unfortunately I can't do that, due to the
> object-relational-mapper-wrapper-mambo-jumbo.
> 
You could still refactor that into one single table, then create two updateable views with the names that the dreaded OR mapper expects. That would enable you to have a proper unique check on the base table, and you OR mapper still sees two tables that it can update.

Thomas




view thread (21+ messages)  latest in thread

Message-ID: <h8lsrk$g9g$1@ger.gmane.org>
Permalink:  ../h8lsrk$g9g$1@ger.gmane.org/
Also on:    postgresql.org/message-id/h8lsrk$g9g$1@ger.gmane.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: spam_eater@gmx.net
  Subject: Re: CHECK constraint on multiple tables
  In-Reply-To: <h8lsrk$g9g$1@ger.gmane.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