Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX4Co-0004RQ-4M for pgsql-general@arkaria.postgresql.org; Sun, 03 Oct 2021 16:19:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mX4Cm-0007mj-6B for pgsql-general@arkaria.postgresql.org; Sun, 03 Oct 2021 16:19:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX4Ck-0007ma-RF for pgsql-general@lists.postgresql.org; Sun, 03 Oct 2021 16:19:11 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX4Cd-0004S0-V4 for pgsql-general@lists.postgresql.org; Sun, 03 Oct 2021 16:19:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id EEB035C00D9; Sun, 3 Oct 2021 12:19:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 03 Oct 2021 12:19:01 -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=R 85sLZR66aSQj4jElddYsELpSNnjoSdzcXZcVWjAQfo=; b=QXgdCO84rti82YXSm 0h8o4CpVxOzI8GDaH6dZXn9KojC+NmjdCIPUfYWDYP31AzgeGk3wRQ/q6h/QWW0v dYADjNpqIeVURACJ1GyYetAxCh9JoK3e8b7uSLuH/U3CCZbhFEayWDT7PPmJKW4j 2kFZM65+i10UgCGinfgXqVi9vJkkgJqlUOr1zlLBi0D/kmlRfY3oihAVm3hWVmRP VL3mkq+zjd5oQhdrZNq3I8Ak+C1X/nDfD+Ti7DB1QtBuHI1/koZpNp5OA8Ta68JG STSaXpp3ElVtXxKhjHqZbYQlujVXRaVBX/ALTda7BHa8GMqogYu+uQVtLCRD3RYM 6NKMw== 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=R85sLZR66aSQj4jElddYsELpSNnjoSdzcXZcVWjAQ fo=; b=CyZ7wYj7v1Ey1BD9Y05+YGMkDTmGz08OgrM60MXekWcLVU4gbb+RyZSVC qRjsr1vaT56Fx627XPxknl1dVV4nBJ1b+zNx1xa61rZP5bG0cHR8F/rTPfqvGWFC sw4PaSn1KDPS5DTc51tfyUbaeIJGrwc2DkGRwi0T6iiLHDWRMIx/EA4d7gx7ysPa HogHNg9OAsyVYLGvIjSJhK1em0pO6lndx0mCInYRnfgBLgPQx8S/l/wQThmZUUXj k6DG6K3DV7WCBk5bvtr01PBwzrPl7pPsgBGLRzUge0lzwnyTHcn6UPBZT8Av+6in n7f4o+EnyNGy2LZ2uM47lPRBH20Pg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeltddgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Oct 2021 12:19:00 -0400 (EDT) Subject: Re: PostgreSQL - Ordering Table based of Foreign Key To: =?UTF-8?Q?FOUTE_K=2e_Jaur=c3=a8s?= , Andreas Joseph Krogh Cc: Thomas Kellerer , PostgreSQL General References: <553c3b6b-93f0-591e-2a48-0c8ab5344d13@gmx.net> From: Adrian Klaver Message-ID: Date: Sun, 3 Oct 2021 09:19:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 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: Archived-At: Precedence: bulk On 10/3/21 7:40 AM, FOUTE K. Jaurès wrote: > Thanks for your input but I want to make a delete with where clause Then Thomas Kellerer's suggestion of having "ON DELETE CASCADE" on the FK would seem to be what you need. If not then you will need to provide more information about what you are trying to achieve? -- Adrian Klaver adrian.klaver@aklaver.com