Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgXLA-0000pn-Rs for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Jun 2019 16:33:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgXL8-0005Dc-Ux for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Jun 2019 16:33:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgXL8-0005DV-K7 for pgsql-bugs@lists.postgresql.org; Thu, 27 Jun 2019 16:33:38 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgXL5-0007BE-A8 for pgsql-bugs@lists.postgresql.org; Thu, 27 Jun 2019 16:33:37 +0000 Received: by mail-qt1-x841.google.com with SMTP id s15so3097920qtk.9 for ; Thu, 27 Jun 2019 09:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=BemAWjcdvzIRR/VHJcHebCTbBxEA5bSLBy2OyeYfoKE=; b=PM5jWouBDiXs3O2wGbnoTs4WFOMBZE9Fo0cvE+VaZg23c5BpYX7zddZq3y3uVLqs5M ddor0t2C9TH2zcPix3xw3IU1QMvSLKGsHPyJGxI9SuE3lKnylwE0a4m+1Wk7b5Cf3Yvr C/Z7Dre3Hxk5/+ZX55pN4cukWgRk0u9oGmis/paAKBkkjJyHrGNKk7LT52+zQSPVKva8 VwFEmhDrM1p+aBxjCcqXBDO05LDHoZ0kJcYjnQtRtlHM0QJjSiFlSJSqaajhQgENxv6o /aPwWcG3fqbfbLZSLx1sO2MGiSVU0ANnDdlYdoclOHRJSRJIJeJ30jm93FYydlEHou+j qWig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=BemAWjcdvzIRR/VHJcHebCTbBxEA5bSLBy2OyeYfoKE=; b=oOucCrLdKE4TBmO0dRAltFHXjhK/1PGXSV2uMzyz0nLmBrBSTHNCyZbWZ1zlz6XK2x rDp7nMgjGXdhAIZOaaDX7QXOFx4zIj0HJjCxIUoy9akSg6Jq3NilZ6rEUo5u3GDlxjL4 MoFhQIi9sZvGTuhVcDGEZkE9QNNXADgG4obqc/+yspxe2Ov7Dip0xReYXeiCHgLoDd17 GOBj/nZPaWN8hIzVNvpHxQqf8Ia3+hgm2/LU6Vv1+u3KDXqp/XsYQVPR4TA4lnAf0twQ 9boIh0zW5bb3wTqfstKibXx7nrXF1yWYkDzhuLiKhsiEkBeyU5LZcFHTO/140auKzpmD 9q9w== X-Gm-Message-State: APjAAAVGcHNTQKpnM3f3bQKRYMAfs6+MtB/5AAwoJXgYEHw7JpddGPvr VJlqvnljjyMLuxa2CVBUB6Mvaw== X-Google-Smtp-Source: APXvYqxoIy01kgZCeyS2Xjh4e7bOQKOjAU/eA7MBJwt60HFseu5U+yucGymlOEYjcNTNDGJ0CkLsHQ== X-Received: by 2002:aed:3fb0:: with SMTP id s45mr4084742qth.136.1561653214570; Thu, 27 Jun 2019 09:33:34 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id a23sm621695qtp.22.2019.06.27.09.33.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 09:33:34 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 3A579120619; Thu, 27 Jun 2019 12:33:32 -0400 (-04) Date: Thu, 27 Jun 2019 12:33:32 -0400 From: Alvaro Herrera To: Amit Langote Cc: Pavan Deolasee , stepya@ukr.net, PostgreSQL mailing lists Subject: Re: BUG #15724: Can't create foreign table as partition Message-ID: <20190627163332.GA30978@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jun-26, Amit Langote wrote: > On Tue, Jun 25, 2019 at 9:57 PM Alvaro Herrera wrote: > > BTW I'm now thinking that those ERRCODE_INVALID_OBJECT_DEFINITION codes > > are not really the correct ones; I mean, it would be the right one to > > use for the unexpected relkind condition, but for the other cases I > > think we should use ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE instead. > > Agreed. I had second thoughts about this one -- ERRCODE_WRONG_OBJECT_TYPE seems more appropriate, so I used that. I also tweaked Fujita-san's recently committed documentation addition. Pushed to 11 and master. Thanks! -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services