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 1olF6l-0006ih-4c for pgsql-general@arkaria.postgresql.org; Wed, 19 Oct 2022 19:52:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1olF6j-0001qv-E8 for pgsql-general@arkaria.postgresql.org; Wed, 19 Oct 2022 19:52:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olF6j-0001ql-3s for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 19:52:05 +0000 Received: from mail.io7m.com ([2001:19f0:5:752:f000::]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olF6f-0001tP-Rh for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 19:52:04 +0000 Received: from sunflower.int.arc7.info (unknown [IPv6:2a02:390:7502:2:0:2:4:0]) by mail.io7m.com (Postfix) with ESMTPSA id 754876C9D9; Wed, 19 Oct 2022 19:51:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=io7m.com; s=mail; t=1666209117; bh=M/oUVnf1uC5D6ZSTtcUPqg3mxOwltt+Ij0gjSxVkKaU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=owBKshcAyCzV5FKM805mqdpNOM1/60oVpSNv06T0uS93VTLLN93jq5noH0uU3CrmP MI4saTKrDUr6auHlyNYes7HGeP5bSIv/1GO2hjHwpn23QCB4DM1il1tflQCRa2fCu5 wCFe6O8op4qjrzIYGhXK2Rq7+cCdqbwWFprOWTryS7+63uw6dAay6U4RyyZEBowSgO 36y4aXtxMNvXCZ+uhBySzldBl32HnyJvkf/HhEZY+oLP836UkEuKAo3H+BxevFCYj3 0hdem9y2ti1XmFkf38k01wfEGar0a4vGOH0YOFX3ryLoRiqE7/1mbRMVUHs+bPIJob bdSMjGxX13BVw== Date: Wed, 19 Oct 2022 19:48:05 +0000 From: Mark Raynsford To: Adrian Klaver Cc: "David G. Johnston" , pgsql-general@lists.postgresql.org Subject: Re: Column value derived from generated column in INSERT? Message-ID: <20221019194805.79d0b2ed@sunflower.int.arc7.info> In-Reply-To: <82c54487-2f99-7829-6f76-a266afb8890a@aklaver.com> References: <20221019173225.53d939f2@sunflower.int.arc7.info> <20221019193057.39aff1c1@sunflower.int.arc7.info> <82c54487-2f99-7829-6f76-a266afb8890a@aklaver.com> Organization: io7m.com OpenPGP: id=2680A50EFD032007FABE8C87B0E4322EEE818BDE; url=https://www.io7m.com/#pgp MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-10-19T12:43:31 -0700 Adrian Klaver wrote: > > HINT: There is an entry for table "t", but it cannot be referenced from > this part of the query. > > HINT: There is a column named "x" in table "t", but it cannot be > referenced from this part of the query. Yes, I saw those, hence asking on the list if there was a way to do it. I'll handle it with multiple statements. -- Mark Raynsford | https://www.io7m.com