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.96) (envelope-from ) id 1vOVvx-00Aq7K-1h for pgsql-general@arkaria.postgresql.org; Thu, 27 Nov 2025 06:56:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOVvw-004COT-0R for pgsql-general@arkaria.postgresql.org; Thu, 27 Nov 2025 06:56:52 +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.96) (envelope-from ) id 1vOVvv-004COJ-2W for pgsql-general@lists.postgresql.org; Thu, 27 Nov 2025 06:56:52 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vOVvu-001jyt-0d for pgsql-general@lists.postgresql.org; Thu, 27 Nov 2025 06:56:51 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-b739b3fc2a0so80312166b.3 for ; Wed, 26 Nov 2025 22:56:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1764226608; x=1764831408; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=olnp3BsNHOx4v5bcqQai5zKpBWiTzs4i4ncaNxmrloM=; b=FMAdlCNT6SHX0eVonSFJch8GZ77DwsZCa/1DUEC81QjIam00sNEosTOy+Ui46Nc2xP C4QF1lm1iuDsD6i6uRSLnZ7tQCce7jnZ2nMO9fIogRU27Hd/It2ILiLDQvqylprdOCjS EPUBXXsyoq/azG+nEQtZoE0SbLrKIowLiGveT+cSEOMtxpD2BtGPN/ZG6gzoiLRb7U5F EXzxh1eT2Op3mqrC6y9YrZ9uZFid1Ac0ll97/CvRptqfzacWWvYBIyzOfCvnW3vG0r1U gWQ2jJt4X1ibau2NyWVKLqrbh9Qa+b8h20Ww/f4E/UW/PkbuSWRAFoqVbgslt3JM+bsO PBgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764226608; x=1764831408; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=olnp3BsNHOx4v5bcqQai5zKpBWiTzs4i4ncaNxmrloM=; b=h/kJL+mQ2l7Q51OWrL3s/PyZTC3birZLwTbraia0qU0sQogRkRf9rLtAZvZwD9fKqM 7BDv5FYNm/SFa80D2zTTnGY5B0Tdrzkr1DOkrVKBMebUrU73hgg6Q6IZ7/TxTY4mpe7r oeN1l9BPhCCtwSuIjZ3KwITMfAs5Z2lXfvUQE7ZH2Fb+rYigb4KqBoEdHMQWVTV+uLCB fi3AEm4azRMgO0KXDAyLrPppf26Otnr9UCiolxzidgHYAGEdK/IdKKT6nTCpnGvaXo3Y WRGHBZgPThZ6rM5U7zFOG8uutIdfh2wMSXOlMfikLiN6qJWeLrJv3qb6nBjGkbGNyPrL ICTw== X-Gm-Message-State: AOJu0YwVvor5q7NKzo6xXjQ19GrDJE8W+GavhILhsoZpCFYVupnOHxzX 5orIFH5FeO4Sh3NVZ3jckrLHpSmBAiTyT5wHbc35sQ+1R5mnzTxTA2l/EH7xdAj/82U= X-Gm-Gg: ASbGncuHLAmofp3sjMNZJNYLGkC0mQpFa6Dyr7/H44etHLiDrNGzIuZBxHaa9h/BWlk er8NBAhOhT+WXbSmZ4OnCKKCRpjY/wVDGeJRNWo18HIEzFLSVDiIgbRK4IC0WdKyHo5HSAO9Mjx pHb4SWp4E45/5p7/toe+N1kMPQkERyUMepHeOvlOZd0Y/eEUvlKL8Wr1bvuL7zXbMOlNU2lXnov lB/6HfiV7HAHr5pxM2aeQoUqKJzLcJzE38tr//XmXT6TyDu3/iham8l4Y+6tjaDPBp6b7YcuOUZ VI5p8yypbK4nUxTt6t8FrUjmfZpkFgTMTjqgkROFVqc/gcftsYRXCp7EDqeaLVNYQqmsAdYYH1d JvVVwaTrNnrloBzqYSI1YoBs262yuBXdLIB7tUmfpJ5iAZTEQ5Ra3UOlgSx8nb6Kh9dsbEmP1PR QJXK1AFYDmoiGsxZ/X+/OWnINNRNrQrHY+iwIBL8HV X-Google-Smtp-Source: AGHT+IEQxE+DH14gJWNI+IBhgWnFKUFfVpwfrPx9C72cQHwNw/1fRtXdd3f2gCx8jqDET6hnt8HLgQ== X-Received: by 2002:a17:907:7292:b0:b72:d117:1a29 with SMTP id a640c23a62f3a-b76c555fcfamr1051760266b.51.1764226608094; Wed, 26 Nov 2025 22:56:48 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:270:1ce:374:d99c:26de:53b0]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b76f5a48c7bsm77522366b.64.2025.11.26.22.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 22:56:47 -0800 (PST) Message-ID: <916918a4bb3461ae62aed8f01f997d86743d7f53.camel@cybertec.at> Subject: Re: set role command From: Laurenz Albe To: Calvin Guo , pg254kl@georgiou.vip Cc: "pgsql-generallists.postgresql.org" Date: Thu, 27 Nov 2025 07:56:46 +0100 In-Reply-To: References: <176402341688.7.8547269556353940402.1025478372@georgiou.vip> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2025-11-27 at 14:25 +0800, Calvin Guo wrote: > create role usera_sandbox in group usera; > \c - usera_sandbox > but what will happen if I then issue: > reset role? Nothing will happen. \c disconnects the superuser session and establishes a new connection, so there is nothing to reset to. > Seems like once I connect as a super user, there is no way for drop the p= reviledge. Precisely. That's why you don't connect as a superuser, unless you need to for administrative purposes. Yours, Laurenz Albe