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 1tYpRH-00FfX4-OK for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2025 16:43:20 +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 1tYpRF-001yhU-GX for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2025 16:43:17 +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 1tYpRF-001yhL-63 for pgsql-hackers@lists.postgresql.org; Fri, 17 Jan 2025 16:43:17 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tYpRC-0003DI-2R for pgsql-hackers@lists.postgresql.org; Fri, 17 Jan 2025 16:43:17 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4361f796586so24801635e9.3 for ; Fri, 17 Jan 2025 08:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1737132194; x=1737736994; 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=F9bTwLCw5hKzjilnJxkQcKr2vIiPa6y3Ecss97d2xTs=; b=Kzv4E/1CM3RNpYXQx4ikFR1GIS97V0XHAHP6PdIOGHMOh+QcQ7RSdxyYIBN0z8j6HC RRUe+GabVvkynC0/nhCLb2W7fDLLNZsCuUL33wU12ydRJsgweX9kajxOAU8rZGMveeyl iK7PNG9qlfD3vXSCO/8dtwxUY3wKerXTmUpbHmhGrjYqhfmS5wXrOxfl+gR7QVqXsvHH 6WrjZwENhxKcyKuB1AA6sZqxo9B8InaPNcHv9d8iVZN1JUC/1kSrSEkGBv44g+I8xPWO rh0yELXUZjFedjnWlRNOLdpeUDudzvgDf8CZndhECdc7DWkyCaLHYLxtQbR6FBEa+3iB AasQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737132194; x=1737736994; 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=F9bTwLCw5hKzjilnJxkQcKr2vIiPa6y3Ecss97d2xTs=; b=JZ5gzZxcTz+tmernMDxcC22lnLKzEuMsl9iKET9Yrli95RHUEdpdDesxNsgyBxv7O6 xOOx27z5e8MBILOtqMPRr/6XdMXYlHchiNp+NH7JMAGjn/ikxLOVzIH1BlyodlXDhJ8C skGruZqItSMxhnm5MXNfZUGxONjET1TgXxYbxbq5ybNlxnJ1fIahVoVbY6jbsuAjws2d vgYXz1wkDCb8Uh9p0ZbsfoFJDJSPStJcxL+WZJ1f4PqmyrV9aflmp89Zs5Fu0k3nw32f PQ/rXOG4+tfI92oZ1lFKa9zAvbCHLrWzoS3lUSz+p6r+qhg0+12tcpHmyY05P9R1EywH eX3g== X-Gm-Message-State: AOJu0Ywa+B34pTTEfJPBSsCiyjkBUcepjoBQriW0CP0nOgQQEa3fY94a hutckxRvj8Y97JkFMZY3Ha20DSEH090Piz2m7SLAT9wChEN0ll3fpFm0at1NHqI= X-Gm-Gg: ASbGncuWyUBbzQT25JKz8UN9c9Lil4gUiMnkAzg5aJw2F3Vmqcclx9XfvH+akgJbCYZ 8igxpToAsVL20LmibPbGDXtvufszyee9/i6G5/NaiDQ+cmgGX5+/lGEzb3XBmkBNaR3W1jXGk3g faLtDDsOvi0YDR+euyrqjqm1xuNVjsETQ6+n8PUHAJ2aj6tGcN2uGuEDvvXAJduJKeAXqKSUdiU oar8UPn75K/DN94UunuihHqOj2/GiuDwy4XQfT0wz8oCWDflbadcWff+shzwuyqLGL7rn0tKk35 qjE= X-Google-Smtp-Source: AGHT+IHFighdyyN3mNyqFd0JHUuc4Y6Q3IJ5OXMyHsGk1yL/5SrBqO3gtlE527Q+dQw6gt+2un6F0g== X-Received: by 2002:a05:600c:4253:b0:436:18d0:aa6e with SMTP id 5b1f17b1804b1-43894744f5amr30430045e9.5.1737132194175; Fri, 17 Jan 2025 08:43:14 -0800 (PST) Received: from localhost.localdomain ([2001:871:255:9ae3:244c:7859:2776:53b7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43890412f7csm38314885e9.9.2025.01.17.08.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 08:43:13 -0800 (PST) Message-ID: <42cf4ffed1779895cd80be940e638751d4847482.camel@cybertec.at> Subject: Re: Fwd: Re: proposal: schema variables From: Laurenz Albe To: Bruce Momjian , Pavel Stehule Cc: PostgreSQL Hackers Date: Fri, 17 Jan 2025 17:43:13 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-01-17 at 11:01 -0500, Bruce Momjian wrote: > On Fri, Jan 17, 2025 at 04:55:07PM +0100, Pavel Stehule wrote: > > p=C3=A1 17. 1. 2025 v=C2=A016:35 odes=C3=ADlatel Bruce Momjian napsal: > >=20 > > So this feature would be like global GUC variables, with permission > > control? > >=20 > > + types and domain type check - holds data in binary form - there are n= ot > > conversions binary, text > > + it is declared - so less space for misuse is there. Custom GUC are ab= solutely > > tolerant > > + it is a fully database object, only owner can alter it,=C2=A0 and eve= nt triggers > > are supported, sinval > > + possibility to set mutability, default value >=20 > Okay, good summary. Now, can people give feedback that they would want > this committed to PostgreSQL? I would like to see this committed too, or at least relevant parts of it. It addresses the perennial problem of people putting state into placeholder GUCs to pass information between the application and the database (SET myapp.application_id =3D 'user_laurenz'). Also, it cann pass information between the code in DO statements and the surrounding SQL code. Yours, Laurenz Albe