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 1s9nFL-005Bgj-Fr for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2024 14:47:16 +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 1s9nFL-00071d-Js for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2024 14:47:15 +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 1s9nFL-00071V-91 for pgsql-general@lists.postgresql.org; Wed, 22 May 2024 14:47:15 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s9nFE-000DRk-O8 for pgsql-general@postgresql.org; Wed, 22 May 2024 14:47:14 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-23d1c4c14ceso2638461fac.0 for ; Wed, 22 May 2024 07:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716389227; x=1716994027; darn=postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XqeVsNWk/Uuw5UvjV6iLp6hW47fve8ekuzZHsHkH+5c=; b=UvhpRbah3yJOx/jHzD20TI3VRI+i7CK15HmRzVFoh7IFVSIpYagnWPakA0fmTf6jXK I11mJBWie+PYuIJ9i3HWQoGOBivKin529JgjyLoBzT1e4n3IZTzXtQeoXN0WkR0ogo/I izBk/JVu49pXFKWJwHWSqmY7SNFCq8gU+Ug/ifKAoJ5bBOdU2zZcOkwxSy6vdYfN4UNg n5CEJfiUHWjL17RE/B30A7x3QRJsjIQivtG34+6JIQetX6Qg831NekwmltRIRbJKcnim Mq358ooinrJZ+FfVP+6FIs3Y/OwUi6oiPRNgHMgZxRsmti691pr9vS7hnR5BjD2ttwU9 xWmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716389227; x=1716994027; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XqeVsNWk/Uuw5UvjV6iLp6hW47fve8ekuzZHsHkH+5c=; b=P4G9H8JijRYggf0+ZjQwCCEa48+hCsdt54/gu03a/sgMpFGkj9g3lyUvFWQTGWHmBc gEVGOnlnkzdMEcV3rBcX9YH0OU7vuUC2LO8+anHDsS13Qbcj5k51uKFM9bDH8sBFsMwS IQ//Zsjikwh+b4BtWn59e/11HAn7HBUinJ3D7RxI52FuKmDG5Vd9eKMB02qMGAISmUhn 7ToO1JRTXbSRV85+itPson6Jd8CCBZTqBsTbQq9zgrYIiRvlVEjO/G1ZxKw9VcJZQban R5gb8fmv8UaZzFT2mgG2pJKxbMFqYUHfwUhfCAEmFVG3rx5tqjEyYz7Wr8yy+usPg9nV 1KEw== X-Gm-Message-State: AOJu0YwSdX8Nhr4FwGv4DYC6hxaCbu6nYalchVE5ywih7NJ6P30Frpl9 EYVS6DBPhXQ7sMOb8JobNSEQHqXJ8ktWY+K9DQE+ROolXkI5aq/SA5LaNkFPR9g8YyepYKDy/JS LGE9emc6dhnIFMxsUJN77/aLaAX1XVQ== X-Google-Smtp-Source: AGHT+IG6EnM2WnATCeUHs03R5SrLlL2vcC9zTWZEF+VMtk9F+npvLUIZUnzclzbcN99GGZW+UQJyiCznkyKZ8xe9H8g= X-Received: by 2002:a05:6870:8a11:b0:24c:5630:b4af with SMTP id 586e51a60fabf-24c68a3753bmr2579364fac.19.1716389227375; Wed, 22 May 2024 07:47:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a8a:74d:0:b0:52c:cea1:1841 with HTTP; Wed, 22 May 2024 07:47:06 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Wed, 22 May 2024 07:47:06 -0700 Message-ID: Subject: Re: search_path and SET ROLE To: Ron Johnson Cc: pgsql-general Content-Type: multipart/alternative; boundary="00000000000031b69706190c0272" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000031b69706190c0272 Content-Type: text/plain; charset="UTF-8" On Wednesday, May 22, 2024, Ron Johnson wrote: > > > It seems that the search_path of the role that you SET ROLE to does not > become the new search_path. > > Am I missing something, or is that PG's behavior? > Yes, attaching a setting to a non-login role is basically pointless as those settings are only applied during the login process. David J. --00000000000031b69706190c0272 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, May 22, 2024, Ron Johnson <ronljohnsonjr@gmail.com> wrote:

It seems that the search_path of the = role that you SET ROLE to does not become the new search_path.

Am I missing=C2=A0something, or is that PG's behavior?

Yes, attaching a setting to a non-login = role is basically pointless as those settings are only applied during the l= ogin process.

David J.
--00000000000031b69706190c0272--