Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDVoR-0004wo-0d for pgsql-general@arkaria.postgresql.org; Fri, 19 Oct 2018 14:31:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gDVoN-0001b1-Ce for pgsql-general@arkaria.postgresql.org; Fri, 19 Oct 2018 14:31:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDVoM-0001aq-4I; Fri, 19 Oct 2018 14:31:35 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDVoG-0000Iy-SN; Fri, 19 Oct 2018 14:31:32 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9BCE722056; Fri, 19 Oct 2018 10:31:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 19 Oct 2018 10:31:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=Z ygNaId0gJvTQ5jaEGibHiJgasLgnKk9rjdyr01kNHA=; b=AiBz0h6JPNxt0zH8l pDPcdA/bii61mZsCvLNqtiDYqD7S21+CDL64675UrEiQAmhe00DTR1sGNMDvsADw RVg4ZdFk3+uJalowE++I2T0A08kiHny6Ow7Q7uwZgziuPA1HzHfm0I27m7wTM9Wa zHJqaF+HvLdpoE3uJvscj6J1bDQqvN2baHpjZ0epynIqJal8a+Bm+FoPiimF/0Cu hxeUMDqMfFgX0FlB+t71124A/4YUC9Tj1GaZWzukxYRVajVynJtNGh0DdbYLN5v3 NYmW4Iap/MeMp8CH32XARR3n3O+7F5VkkTcQ9U/8iRZGAFbe4535ZABSo9JddHPW 0C37Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ZygNaId0gJvTQ5jaEGibHiJgasLgnKk9rjdyr01kN HA=; b=jxIGzXzWP0eQdSODRGyqpJS970XamXiUFz+c/oSjbnSzC6VKMOonOXvv/ 7u82QycaK2EoFkeXe5TdSZGCit6G9hfO9S4NNGNJKFmRyIhJ7IWE9FC4b2kfzP3Y 5iNVWmaOL3hzgggvJ9f4+7n3+WInhQnTQkpPS7wruspvUxL3baww9h64EeBUWfIy Oxip0O4XMjZ3kij0l+aVqV/TrYmIVKzdu6ZuGOVaoK5aSKyUiAqT+tN3lMmFD+BH /qKmAUXyFOHaInAMeZhRGjvCE3NIFg6r0inTE3ewHNQiO4poM857+XPempIsn3j3 rWgBRfQw/p9sk4LCyXEK+WFU+eWyg== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 67A94102EC; Fri, 19 Oct 2018 10:31:25 -0400 (EDT) Subject: Re: Problem about partitioned table To: Mehman Jafarov , pgsql-general@postgresql.org Cc: pgsql-hackers@postgresql.org, support@enterprisedb.com, de@postgresql.org, contact@postgresql.tw, info@itpug.org, webmaster@itpug.org, majordomo@postgresql.org, info@postgres.de References: From: Adrian Klaver Message-ID: Date: Fri, 19 Oct 2018 07:31:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/19/18 2:03 AM, Mehman Jafarov wrote: > Hi everyone, > > I have a problem with partitioned table in PostgreSql. > Actually I use the version 10. I created the partitioned table in test > environment but face some problems with partitioned table constraint. > I google all about it last week and from the official site I get that > version 11 will be released and that feature will be supported as I > understand it. > From version 11 documentation > "/Add support for |PRIMARY KEY|, |FOREIGN KEY|, indexes, and triggers on > partitioned tables/" > I install and configure yesterday as new 11 version released. And test > it. Unfortunately I didn't achieve again. > Neither I don't understand the new feature nor this case is actually not > supported. > Please help me about the problem. As you found out: https://www.postgresql.org/docs/11/static/ddl-partitioning.html 5.10.2.3. Limitations "While primary keys are supported on partitioned tables, foreign keys referencing partitioned tables are not supported. (Foreign key references from a partitioned table to some other table are supported.)" > >   Note: I want to create constraint only one-to-one column > (/fk_to_user_doc_rel - oid/) > > BIG QUESTION IS THAT > > How can I solve this problem?  What is your recommendations? Well a FK is a form of a trigger, so maybe create your own trigger on the child table(s). > > *PLEASE HELP ME !!!* > > -- > */Best Regards,/* > */Mehman Jafarov/* > */DBA Aministrator at CyberNet LLC/* > */ > /* -- Adrian Klaver adrian.klaver@aklaver.com