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 1qY7SX-000po5-DI for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Aug 2023 16:08:53 +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 1qY7SW-008BVW-76 for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Aug 2023 16:08:51 +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 1qY7SV-008BV8-QU for pgsql-hackers@lists.postgresql.org; Mon, 21 Aug 2023 16:08:51 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qY7SS-000CQs-0N for pgsql-hackers@postgresql.org; Mon, 21 Aug 2023 16:08:51 +0000 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5650ef42f6dso1916837a12.0 for ; Mon, 21 Aug 2023 09:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20221208.gappssmtp.com; s=20221208; t=1692634126; x=1693238926; 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=C/2G7zMtX8b8GKbk1dukbp6XbY+Ysg0QVa1sTVWDKCc=; b=yRpsP+ZbvdZSPk1H9Ya8lP89c5yaGy39lRcwodvpEcv4EFe9JTL1ZERN502teYTOIx DRImApKyd7A8YWwEoWpRpghdntbCCrRFt8CShlBkTEV6XJT5gYzmQVdiUDXl6tcOasQh CtZXsV+ixChBOmcD/YOio48jrsUS5LvIccZ4JgR1OoI3F7ItZVgt/Xidxg84al2TPNDy OusiLlB7fzcTiCeg7+UhPyQTFhLJMigu98wff5EUROcD4YA043MUalFgkSLR3ZLVQFbE pUqMgYkAs5P8SGXA50jQ5NajN6equmczZC/v7+I3OhoVSmCoLLaT05OjKZsb6EcdfBFL VO+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692634126; x=1693238926; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=C/2G7zMtX8b8GKbk1dukbp6XbY+Ysg0QVa1sTVWDKCc=; b=g79sFLjjNXUuIjJSuD/ZVvVtUulbWmeKpq3kicTW2KHh9Zpr6Sdf+R5b58Ju6XlEFA nZrhtYGfUhFezNz4SmolYErPl9PM0VvctwWEFHYPv4+ec28P0NDjV01eWQDoSWVRkmNb hvIPsotPysdgE61irgcp3sIsvw3y5+fIncfjgpsyPheNfYMe43DgkBAMo5laWEJ4tjcm ZJSRhBcXJk2fbMwl+8EK62Ki3douACIulDQPY896vkvfpSg8wMB8269YKuV4ymynlROv rhdUmLBAXXbwnhIb8c888luZslxePWcLd9M7lJ6xQPqtRNcKHD9jhbzapwe+Fc0tT8Ma ywdA== X-Gm-Message-State: AOJu0Ywcg4OqB/LpgzbY4lrf6mvPahsirPAq+hFrUpQMJ1WO56VdiEhT jOXlgapMPE+96qnkkp91qhpIKA== X-Google-Smtp-Source: AGHT+IGMkvMfJnq815DuetgIIh8y6qJzTv44LMiY4K5Lh8mYiG2YE5IE/+Yn839hL/tNcF3zErdjgg== X-Received: by 2002:a17:90b:1e0b:b0:268:5d00:3751 with SMTP id pg11-20020a17090b1e0b00b002685d003751mr4235018pjb.10.1692634125758; Mon, 21 Aug 2023 09:08:45 -0700 (PDT) Received: from jeff-laptop.lan (c-98-45-81-55.hsd1.ca.comcast.net. [98.45.81.55]) by smtp.gmail.com with ESMTPSA id 5-20020a17090a018500b0026b26181ac9sm8697255pjc.14.2023.08.21.09.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 09:08:45 -0700 (PDT) Message-ID: Subject: Re: [17] Special search_path names "!pg_temp" and "!pg_catalog" From: Jeff Davis To: Pavel Stehule Cc: pgsql-hackers@postgresql.org Date: Mon, 21 Aug 2023 09:08:43 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2023-08-19 at 07:18 +0200, Pavel Stehule wrote: > cannot be better special syntax >=20 > CREATE OR REPLACE FUNCTION xxx() > RETURNS yyy AS $$ ... $$$ > SET SEARCH_PATH DISABLE >=20 > with possible next modification >=20 > SET SEARCH_PATH CATALOG .. only for pg_catalog > SET SEARCH_PATH MINIMAL .. pg_catalog, pg_temp I agree that we should consider new syntax, and there's a related discussion here: https://www.postgresql.org/message-id/flat/2710f56add351a1ed553efb677408e51= b060e67c.camel@j-davis.com Regardless, even with syntax changes, we need something to print when someone does a "SHOW search_path", i.e. some representation that indicates pg_temp is excluded. That way it can also be saved and restored. > I question if we should block search path settings when this setting > is used. Although I set search_path, the search_path can be > overwritten in function of inside some nesting calls=20 If so, that should be a separate feature. For the purposes of this thread, we just need a way to represent a search path that excludes pg_temp and/or pg_catalog. Regards, Jeff Davis