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 1pZCog-00059r-6U for pgsql-general@arkaria.postgresql.org; Mon, 06 Mar 2023 15:31:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZCof-0001kg-3h for pgsql-general@arkaria.postgresql.org; Mon, 06 Mar 2023 15:31:57 +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 1pZCoe-0001kW-PS for pgsql-general@lists.postgresql.org; Mon, 06 Mar 2023 15:31:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZCoc-0001HS-A8 for pgsql-general@lists.postgresql.org; Mon, 06 Mar 2023 15:31:55 +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 326FVqPP3353929; Mon, 6 Mar 2023 10:31:52 -0500 From: Tom Lane To: Dominique Devienne cc: pgsql-general@lists.postgresql.org Subject: Re: CREATE/DROP ROLE transactional? GRANT/REVOKE? In-reply-to: References: <3351044.1678115172@sss.pgh.pa.us> Comments: In-reply-to Dominique Devienne message dated "Mon, 06 Mar 2023 16:25:24 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3353927.1678116712.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 06 Mar 2023 10:31:52 -0500 Message-ID: <3353928.1678116712@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > On Mon, Mar 6, 2023 at 4:06 PM Tom Lane wrote: >> DDL commands in Postgres are >> transactional unless their man page explicitly says they're not. > Could you point to where in the doc this is stated? For example, for CREATE DATABASE the first "Note" para in [1] is CREATE DATABASE cannot be executed inside a transaction block. I don't think we are entirely consistent about whether this is mentioned in "Description" or "Notes", but it's there somewhere. regards, tom lane [1] https://www.postgresql.org/docs/current/sql-createdatabase.html