Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsOUz-007riB-T2 for pgsql-general@arkaria.postgresql.org; Mon, 16 Oct 2023 14:23:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qsOUx-001Sjo-Mq for pgsql-general@arkaria.postgresql.org; Mon, 16 Oct 2023 14:23:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsOUx-001Sjf-Bh for pgsql-general@lists.postgresql.org; Mon, 16 Oct 2023 14:23:12 +0000 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qsOUu-000zv7-0X for pgsql-general@lists.postgresql.org; Mon, 16 Oct 2023 14:23:11 +0000 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5a7cc03dee5so56443997b3.3 for ; Mon, 16 Oct 2023 07:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697466185; x=1698070985; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aTLvzMWe3hMPyQyJCvpZhReMTnCYRCkvvf3gzzF+sEA=; b=cwUelICQ6kIqfPdURFKxotMe77hOJbfF+HdYpos/q0PU5hyuncItGIzEGb5sqlWMN3 awRnF6+xw4h7DUuqGW+uh9jRLbyj0uhn+5VOl+29SGaSk8GyoNKiMKK6e4XdZmJIMX08 S71QM38tIjNgsO+J0BBJIXvx1PO/Lswz/Ccq6S2FXZfTNIyDkRNWr74uShd2j40ZCP/d Vg9ErTsqc4AX5MFivo4+O37B/PsaWfsVwr6xbFSA/U65frKSYpZw5pOdSRLLKrFtCBxx B1fjOnQpk2r7rMEnhq2woVspb4fAiaJC+23/gjRH1hWBVLDkofXa1LxqrA9nsnn2JpL+ Fr2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697466185; x=1698070985; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aTLvzMWe3hMPyQyJCvpZhReMTnCYRCkvvf3gzzF+sEA=; b=Pjv8Kf6RSyjNirrXwy2YTw/I/nxF0V/2bbexVPvtWoYjbVyEmzk3gZ3vy7D/dnx92h PVwulh/wFeEbprXF0Jj8mnQEgcxqXL5ZM2a7HLVDedjCO1+420HVwVo8MOGcyDq5xmSp r4NzJ7pN394eMRgbaXsYan0f3ClcrwVB9L6ng00VzqXY+avw59wpxPOSvj8ZEKkTIkGQ wjeghB8ZAUO8AFIgL0oa0Vgwt/zOGeBg8GpTySAgTOVMtuN+uEfduxTytbSndE8WigST UUjbzQBDHwJkaByOpZfaw1z3WQlMkq8Ol9VnQsW54knNjPdbVBEIsl9dIVBmpyF7yUVQ axHg== X-Gm-Message-State: AOJu0YzFigNjl/Z8iUrdUkLvlSGdqWPTJ8Z5j4hWKwy93hOZiNXhQ6cR Pv8F/o+hABV5gkoVxll9ZpRRCzSVNCk= X-Google-Smtp-Source: AGHT+IF93yXAYT0AsKOTx6EBLmz9pwEvPoZ5JocfuKxnp9lFtdUnLYtqq73RooVNVxQs1ihVKvSClg== X-Received: by 2002:a81:ad42:0:b0:5a7:aa65:c536 with SMTP id l2-20020a81ad42000000b005a7aa65c536mr19666754ywk.0.1697466185195; Mon, 16 Oct 2023 07:23:05 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:40a2:fd1b:5726:298c? ([2600:1700:bd2c:b810:40a2:fd1b:5726:298c]) by smtp.googlemail.com with ESMTPSA id g189-20020a8152c6000000b0058c8b1ddcc1sm2256743ywb.15.2023.10.16.07.23.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Oct 2023 07:23:04 -0700 (PDT) Message-ID: <69f7c5ff-02bc-42ee-a98f-3f990fb44f3b@gmail.com> Date: Mon, 16 Oct 2023 09:23:04 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Purely declarative FKs Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <589ff648-9774-d166-450e-74695ae77161@gelassene-pferde.biz> <60D62406-E176-4F93-B9B4-C1C6CFA66B84@thebuild.com> <2289588.1697465165@sss.pgh.pa.us> From: Ron In-Reply-To: <2289588.1697465165@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/16/23 09:06, Tom Lane wrote: > Christophe Pettus writes: >> On Oct 16, 2023, at 00:51, Thiemo Kellner wrote: >>> Question: Are there plans to provide a feature in PostgreSQL that one >>> can have foreign keys for purely documentation purpose - I know, one >>> could use a modelling tool and just not implement the FKs, but my >>> reality is, there is hardly ever a modelling tool involved. >> The answer to the specific question is, no, I don't believe that there >> any plans to implement purely documentary foreign keys. > Recent versions of the SQL spec have a NOT ENFORCED option for > constraints, which is what I think you're looking for here. > If somebody came with a well-thought-out patch to add that feature, > we'd likely take it. But this is definitely a "scratch your own > itch" situation; I don't know of anyone already working on such > a thing. NOT ENFORCED would be a great boon to administrators writing regular archive/purge operations. -- Born in Arizona, moved to Babylonia.