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 1sMDGJ-0018ah-8Y for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jun 2024 20:59:35 +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 1sMDGH-000bg1-FZ for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jun 2024 20:59:33 +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 1sMDGH-000bft-66 for pgsql-hackers@lists.postgresql.org; Tue, 25 Jun 2024 20:59:33 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMDGF-003Xij-72 for pgsql-hackers@postgresql.org; Tue, 25 Jun 2024 20:59:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 45PKxTWn1362411; Tue, 25 Jun 2024 16:59:29 -0400 From: Tom Lane To: James Coleman cc: pgsql-hackers Subject: Re: Should we document how column DEFAULT expressions work? In-reply-to: References: Comments: In-reply-to James Coleman message dated "Tue, 25 Jun 2024 16:51:05 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1362409.1719349169.1@sss.pgh.pa.us> Date: Tue, 25 Jun 2024 16:59:29 -0400 Message-ID: <1362410.1719349169@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk James Coleman writes: > It's possible I'm the only one who's been in this situation, but I've > multiple times found myself explaining to a user how column DEFAULT > expressions work: namely how the quoting on an expression following > the keyword DEFAULT controls whether or not the expression is > evaluated at the time of the DDL statement or at the time of an > insertion. Uh ... what? I recall something about that with respect to certain features such as nextval(), but you're making it sound like there is something generic going on with DEFAULT. regards, tom lane