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 1gEfch-0006JU-Cx for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Oct 2018 19:12:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gEfcf-0007kA-KI for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Oct 2018 19:12:17 +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 1gEfcf-0007k3-4N for pgsql-bugs@lists.postgresql.org; Mon, 22 Oct 2018 19:12:17 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gEfcb-0000C7-43 for pgsql-bugs@lists.postgresql.org; Mon, 22 Oct 2018 19:12:15 +0000 Received: by mail-qk1-x735.google.com with SMTP id x8-v6so26106336qka.4 for ; Mon, 22 Oct 2018 12:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=uFXd6Lfakau9hn80sYvtNbkBuTJDtO+wimMdKR92x5Q=; b=0LeQtd/USWjzCzatmdq3KBPhOKtCqcA82m1BDlQuCGsoYDDo5pcFpUeD7WG4XHB80/ cqzlJQvy4USefwdZUTXHmKsmQnQcnEZlI9JtXPnzQdXJY2MOqj08JqOr9jm32blMlWne Tv7XgMPXF8xbOs7sxIgdWNyeJtF3ETGrngQzJdzJvBmdHkvMw6MxYJxJLJQqo1xEV3aH RgrJcPRlpl9YAG31cEha0FXSGfmSe/1kHNGxMwffi5v5FSemQp3F0UCARi9CA2E+muhp XLhlN98y8xC0Iiq683lwRAT16VaGUiGHvWjR+keJEp2ZbvitY61Rie7BC0wK2NyAHn+l Dfvw== 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:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=uFXd6Lfakau9hn80sYvtNbkBuTJDtO+wimMdKR92x5Q=; b=h8dXBv/cn3BcHJK9zuIg2RlJYbx1+3PQtyDz0dk9CtXuYOJg2HzCIGAcfrgjbp/7YY fQdo9+cqLjKpGwWHKtK8ddF0iFEgLvz/jIJWFQGp6DPDVEQydQxU+uwXpd4Ws8HbhjDt BrEdYoacS3PBEuW7Nn1DrU0btN40mibrYTjtqp6YodyfPRiLJg5nuV279uoQhnrEBHVm BUxsN1s6gP4TEZzGEne9wMXcPiBn7sEVvt7d2P8E3X3S2/hOpXppFqeFNiENBILQnu+X YkZyIBOkAFES5D0x6WI/QgLxuqc41yvedJbKLX1PB5plhCtwGJCeg7xvRutgsHrkw5YF ye/Q== X-Gm-Message-State: ABuFfoiOlUCFazA0Hn7O/MoHw2NibPMue8clpYwE3icvsMPzhvRTLgxU tbeOjLdVz7TnKEQUnJ/UQoEQTe3/WSE= X-Google-Smtp-Source: ACcGV61e7OC/NMod40aCi/lv7i5RTH6xyV7f9DCfnuhD+Rmita59UsCZCBqcci4a5U+5bKPkOVjhEw== X-Received: by 2002:a37:9385:: with SMTP id v127-v6mr44142293qkd.71.1540235531662; Mon, 22 Oct 2018 12:12:11 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id f44-v6sm6095469qta.53.2018.10.22.12.12.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Oct 2018 12:12:11 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id EAFC4640; Mon, 22 Oct 2018 16:12:08 -0300 (-03) Date: Mon, 22 Oct 2018 16:12:08 -0300 From: Alvaro Herrera To: harry@harryclarke.me.uk, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15451: Error adding foriegn key constraint Message-ID: <20181022191208.po23ymm4c45qziqk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15451-d33ba98cab3afa91@postgresql.org> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Oct-22, PG Bug reporting form wrote: > ERROR: constraints on permanent tables may reference only permanent tables > > ALTER TABLE bnm.table1 > ADD CONSTRAINT id_fk FOREIGN KEY (bnm_id) > REFERENCES bnm.table2 (id) MATCH SIMPLE > ON UPDATE NO ACTION > ON DELETE NO ACTION; Is table2 an unlogged table perchance? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services