Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4dFF-0002QZ-UG for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Jan 2022 06:24:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n4dFE-0002EU-P6 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Jan 2022 06:24:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4dFE-0002EK-B8 for pgsql-hackers@lists.postgresql.org; Tue, 04 Jan 2022 06:24:28 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n4dF7-0002RZ-DJ for pgsql-hackers@lists.postgresql.org; Tue, 04 Jan 2022 06:24:27 +0000 Received: by mail-il1-x132.google.com with SMTP id c4so21190129iln.7 for ; Mon, 03 Jan 2022 22:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3mwv5tTJ/A+eN7WSfZPIIiBw5+U4D52/cBS5t3J0E2Y=; b=LIAO+SIukQAfqjQKEIhHbFjFiS4Ca7LwAhnjhUpgF0UguiuCAvsj9c0DxdPUitig5e xZSiFjCS5BXeQszPq1en1pfBZOg7og8Ef8gatRwOyGjS5m4/X+LFoo15WtyOnqRFf+QZ Vbv/KvoPYRktv6YV/l21goDZcdOXdYTCiLcWMdS5+jUknRsk/26/m8US1VXJzPmJCm47 lZ/YKGBoe8FlP7759W+i+GJSzPUsFu7WvDcvWG8Kf46FeCiVe94fAdm5GSmjrSjy9oBR O3TxeJVWxDtT3K2tNmOVi+arSq4MR8EsbvZSrYbews3vHlIi8Q0mdfe16zp1lsTJHza9 KshA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3mwv5tTJ/A+eN7WSfZPIIiBw5+U4D52/cBS5t3J0E2Y=; b=LeDHVF1e5QcZ5BQiTn6noNFKe3YNjgExfJVIrFqnliP2JDzHnw794lwvr+lbmn8rrG +Vje4jcODG9NpKxxLIBOXJdisQCQ1FdZHXTONjE/XiPE97KYDh5ENUMa72778VSHeFgQ FKylalepbFeNtCORDyaHYC7dI43i+sw+WBVrIKHCZnc1b5RQqiL4W2u7FoIK2npnDBD0 ul0e+Fut7DqyvzgkuwMqknR7BK5+SYN/1q+/gaXostPdbcEt9Q1TMiBloVrgDz4dNkdr 9pLC8rNy8VQZ7+2Kswjr2BSs2ust+LKLXrNzypVOcYbUNo8nSSfRK3ckN8/jRg5qwjmC H7xQ== X-Gm-Message-State: AOAM530yOX3hsJFv5kKbmYVt/9OCQhG6zj8XACtWe2+n+jk8vTfmzZhJ p+vYLdktzLKz1vSQ6aCCgjpjjz5g6iueTw== X-Google-Smtp-Source: ABdhPJzzlFOI930mRUutH/MkPITw1d0GKkx3Ccn0HpeMrzQV2AZr5uDGovV1oYZA5iJQGQqa6bmZjA== X-Received: by 2002:a92:c80d:: with SMTP id v13mr22928136iln.26.1641277459287; Mon, 03 Jan 2022 22:24:19 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y15sm27033279iow.44.2022.01.03.22.24.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jan 2022 22:24:19 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 2BB03802E30; Tue, 4 Jan 2022 00:24:18 -0600 (CST) Date: Tue, 4 Jan 2022 00:24:18 -0600 From: Justin Pryzby To: Pavel Luzanov Cc: pgsql-hackers@lists.postgresql.org Subject: Re: psql: \dl+ to list large objects privileges Message-ID: <20220104062417.GA14051@telsasoft.com> References: <6d722115-6297-bc53-bb7f-5f150e765299@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d722115-6297-bc53-bb7f-5f150e765299@postgrespro.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 31, 2021 at 05:14:12PM +0300, Pavel Luzanov wrote: > I decided to move the do_lo_list function to describe.c in order to use the > printACLColumn helper function. And at the same time I renamed do_lo_list to > listLargeObjects to unify with the names of other similar functions. The tabs were changed to spaces when you moved the function. I suggest to move the function in a separate 0001 commit, which makes no code changes other than moving from one file to another. A committer would probably push them as a single patch, but this makes it easier to read and review the changes in 0002. Possibly like git diff HEAD~:src/bin/psql/large_obj.c src/bin/psql/describe.c > + if (pset.sversion >= 90000) Since a few weeks ago, psql no longer supports server versions before 9.2, so the "if" branch can go away. > I don't like how I handled the + modifier in the \lo_list command. But I > don't know how to do better now. This is the second time I've programmed in > C. The first time was the 'Hello World' program. So maybe something is done > wrong. I think everywhere else just uses verbose = strchr(cmd, '+') != 0; -- Justin