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 1qorFV-003CaA-2b for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Oct 2023 20:16:37 +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 1qorFT-00BYQc-0G for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Oct 2023 20:16:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qorFS-00BYQT-IB for pgsql-hackers@lists.postgresql.org; Fri, 06 Oct 2023 20:16:35 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qorFQ-000Moo-8b for pgsql-hackers@postgresql.org; Fri, 06 Oct 2023 20:16:34 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9936b3d0286so466819166b.0 for ; Fri, 06 Oct 2023 13:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1696623389; x=1697228189; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=XP6Q6vbGwJb80sYdRjMMlWjoySmJwem5D1fmfO2nVHs=; b=ZBeuZ2v4aLrxqCGn5eEybAsUsqtEvUQlY9GZE0Ih87UhSuHQSA/49Xd1yepSRxDWYS oG5lQT5I741CKMCSwF+Iz7zfAoVrajyOkEtzsOWG8TJbjeab8skCtOAU2BpGCRZfF8lF D2HZBTUX6Ada3MMep0jXpharKMNdvn4Ihg3a4KXsnfdLcaWS5ARmJImroSfE/h5KUGIj ttGpwXcTI3vVGlsjZcE2bnyJCHOlWjp3YK53kjkRM/6C3aSxxb1lJo9Zx+MdBFgRzpJo 9Pwi7mMI2aEqCaqLNMNiC2Hvus/60yx9Vn78qRge4SbN4OZ33tsp4zCkYzVlZ6aYLde3 gUfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696623389; x=1697228189; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XP6Q6vbGwJb80sYdRjMMlWjoySmJwem5D1fmfO2nVHs=; b=xLXVtpfaLXXXgfyPzpJfaxf/P3ZEC8oVeJQkzRmVh9NBvxu7GNo98OyybmRhJd6zgZ WTbTgf1O3LhbNGlxSmsJCTl0gEEXTsZXkWoYzVdz9bBJF3EuSxJCp+BhJ4HqrLjCvTfE OfVOTivn1M3MrKB7F8DT9xQ5yDxECocKHGT647GHSaFHrGBsM+uev4fw8YsaZLt3PS2K BNfS01vquPYA3P3UO9H6Jtr4bx5b+2ecinY6Zpz818OEwo8g2e4WLWk+dfHQ6RJVlLRS lhDXvCyqNVAUxCQbpNJx1YQblLUyC/JHVwZeYW8foCR+/IU27j/A/kJHOOk4nhJT8riK AfaQ== X-Gm-Message-State: AOJu0YwiXtxy++RieJX95PyHpSuZvnfHYU8bPcqYG/jd7Ws9yEZj9dwD XXXIYK+3ExWZ05YR6+KMr9N3VQ== X-Google-Smtp-Source: AGHT+IE81JTr7XtvAQddvFOarSYSatsiN7VzgTLK6ONwmyH4pz5nTuptLyqwy10ezpeT389mvxMmgw== X-Received: by 2002:a17:906:8b:b0:9b2:b149:b81a with SMTP id 11-20020a170906008b00b009b2b149b81amr9625223ejc.64.1696623389331; Fri, 06 Oct 2023 13:16:29 -0700 (PDT) Received: from localhost.localdomain (178-190-178-223.adsl.highway.telekom.at. [178.190.178.223]) by smtp.gmail.com with ESMTPSA id op26-20020a170906bcfa00b009b65a834dd6sm3349590ejb.215.2023.10.06.13.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:16:28 -0700 (PDT) Message-ID: Subject: Re: Restoring default privileges on objects From: Laurenz Albe To: "Peter J. Holzer" , pgsql-hackers@postgresql.org Date: Fri, 06 Oct 2023 22:16:28 +0200 In-Reply-To: <20230830100030.oxnegs7cxbzvjizt@hjp.at> References: <96d6885a-5e25-9ae8-4a1a-d7e557a5fe9c@mtneva.com> <1166048641.281962.1693308151542@office.mailbox.org> <1006397.1693318485@sss.pgh.pa.us> <1550267563.330669.1693335893138@office.mailbox.org> <31246.1693337238@sss.pgh.pa.us> <20230830100030.oxnegs7cxbzvjizt@hjp.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2023-08-30 at 12:00 +0200, Peter J. Holzer wrote: > On 2023-08-29 14:44:48 -0600, Stuart McGraw wrote: > > On 8/29/23 13:27, Tom Lane wrote: > > > Fixing \dp to honor "\pset null" for this might be a reasonable > > > thing to do too.=C2=A0 I'm actually a bit surprised that that doesn't > > > work already. > >=20 > > That change would still require someone using \dp to realize that > > the "Access privileges" value could be either '' or NULL (I guess > > that could be pointed out more obviously in the psql doc), and then > > do a '\pset null' before doing \dp?=C2=A0 That seems a little inconveni= ent. >=20 > Or just always do a \pset null. For me printing NULL the same as an > empty string is just as confusing in normal tables, so that's the first > line in my ~/.psqlrc. YMMV, of course. >=20 > But I guess the point is that people who do \pset null expect to be able > to distinguish '' and NULL visually and might be surprised if that > doesn't work everywhere, while people who don't \pset null know that '' > and NULL are visually indistinguishable and that they may need some > other way to distinguish them if the difference matters. >=20 > So +1 for me fixing \dp to honor "\pset null". +1 Here is a patch that does away with the special handling of NULL values in psql backslash commands. Yours, Laurenz Albe