Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 7DD2863569C for ; Wed, 3 Mar 2010 11:14:42 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 21807-04 for ; Wed, 3 Mar 2010 15:14:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.211.181]) by mail.postgresql.org (Postfix) with ESMTP id 7A3A7633B25 for ; Wed, 3 Mar 2010 11:14:31 -0400 (AST) Received: by ywh11 with SMTP id 11so560703ywh.28 for ; Wed, 03 Mar 2010 07:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=wKLifSsGDcV6F2m0kCXJgHvOP3RxwP4fasoNM8URNlQ=; b=R+jF1gS/vxdevaneGKDCUm46k47ZnVXJw/2XYl88bluGgsc8+rMcDkIJbhM8+xHm0v bfD49y1ChV3VsLRu3ZKapN+0YRECYe+EOs/WMPmfii9oOBDTxe4LvKum2cHOdHVbqz1G /JdTu4iARbfqZmUCIlGfmLZ9JzESNkU0plDCQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Ux72lRObWYaQSL7EhZ/uYo2uMN2Ugr/jf3X/E3UQ1gTvu7ofBjBkFfX+X6rADsETku GJRm+2n/bdmjs2ExCOvw+qoVujS2VJ5zdSeNWiSuZra2gBHUZM7IU+VhGzODSDuM0fMv TIyIt5u9+C+G1jC7oU4ul9YQH4rNqPHksQuxg= MIME-Version: 1.0 Received: by 10.101.185.29 with SMTP id m29mr2440554anp.191.1267629269727; Wed, 03 Mar 2010 07:14:29 -0800 (PST) In-Reply-To: <20100303150227.GA18661@apartia.fr> References: <20100303150227.GA18661@apartia.fr> Date: Wed, 3 Mar 2010 07:14:29 -0800 Message-ID: <396486431003030714s48b239e2ub8b58a49b9aa29e4@mail.gmail.com> Subject: Re: check constraint on multiple tables? From: Richard Broersma To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.081 tagged_above=-10 required=5 tests=AWL=-1.082, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201003/13 X-Sequence-Number: 33720 On Wed, Mar 3, 2010 at 7:02 AM, Louis-David Mitterrand wrote: > What is the best solution? Adding an id_ship to 'cabin'? Or check'ing > with a join down to 'ship'? (if possible). Can you post simplified table definitions for the relations involved? -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug