Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2F273B5DBF4 for ; Fri, 15 Jul 2011 14:21:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 41942-02 for ; Fri, 15 Jul 2011 17:21:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DF8F7B5DBBF for ; Fri, 15 Jul 2011 14:21:48 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p6FHLcq0003427; Fri, 15 Jul 2011 13:21:39 -0400 (EDT) To: Gavin Flower cc: Alvaro Herrera , Pg Bugs Subject: Re: Spurious errors relating to escaped single quotes In-reply-to: <4E1FFA47.20501@archidevsys.co.nz> References: <4E1ED6BC.9020709@archidevsys.co.nz> <1310661849-sup-6899@alvh.no-ip.org> <7689.1310670857@sss.pgh.pa.us> <4E1F4AED.8060800@archidevsys.co.nz> <4E1F7AED.2030201@archidevsys.co.nz> <4E1FFA47.20501@archidevsys.co.nz> Comments: In-reply-to Gavin Flower message dated "Fri, 15 Jul 2011 20:28:55 +1200" Date: Fri, 15 Jul 2011 13:21:38 -0400 Message-ID: <3426.1310750498@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=0.001 X-Spam-Level: X-Archive-Number: 201107/125 X-Sequence-Number: 30737 Gavin Flower writes: > On 15/07/11 11:25, Gavin Flower wrote: >> I think it should be possible to put a constraint on the master table >> to prevent rows being inserted. > Of course, minutes after I sent the above - I realized these constraints > are inherited, so the above is nonsense! :-( Yeah. I think there's been some discussion of inventing a non-inherited variety of check constraint, so that you could put something like "CHECK (false) NO INHERIT" on the parent table. There's not really consensus for this though. IMO we'd be better advised to spend our time on building an explicit partitioning mechanism to handle the common cases more simply and efficiently, instead of continuing to add frammishes to the inheritance mechanism. regards, tom lane