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 1pFewc-0007xc-3f for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 17:31:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFewa-0004lj-98 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 17:31:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFewZ-0004kS-St for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 17:31:19 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFewX-0006x4-EU for pgsql-hackers@postgresql.org; Wed, 11 Jan 2023 17:31:18 +0000 Received: by mail-oi1-x22a.google.com with SMTP id r205so13288656oib.9 for ; Wed, 11 Jan 2023 09:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Eqx7wNXL8HId5ALAtLqrx2SkjGT6bukZld2H3d8xWoo=; b=IPsfjtitAqIeKphpbqAluPJzTgpzwvDP34bZjupo26G/px3uQHViMc6AWBpQ7fSuZV KBOmPYUliHlC2GmlRPTWobbPoDwtthtsSRdEp0YjmDCj/4dJbTNheqN9oSE2N1nkTt+e NxzJ8GcUCH4VCaEtWN0DyPVB85nBTghnY0+7jKbhW2ylqPSIjK518PQOFjrtdPBXPw0D Eojx6WWEEgoxtQ/U375aHuhVfGo9J+WZ0IQYDMzQ2OOcApZPQ3sM2yCVTuJD4mtRU8YU hWcbrNRRtM7TzFNSt8DIwkp5PGijWh1SvKa0/Q+FOu7LcfRL4PRpEdLEnLlNt5H+D07a 3TxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Eqx7wNXL8HId5ALAtLqrx2SkjGT6bukZld2H3d8xWoo=; b=Z9MPjgtMcmQPd6XqCAelCoiyqKeWpOVEdLPfCClKWLx424zaSgjz3evKUzalREn7xC HZPV8ZM329krPvIYg7xitL9Fn9mlF0/kbtdp8t+N0sozsRGELKFfwJkAP2OLZRRefC9u e7JyzYiluHdWFYgYl28EOd/7dUAy2tAsazKozcc2NeUhbbNeyHQuDngbIUVbyqgz1Tlj 7Wh4Q2CazvaSNt8c4pjoe+kgh5jeeUkGdXwPXGD2jLKYnmwhj3spWp4SxT1jKImpLOSX 94wAfwJ/kbYAkQ3+eB4b0kj3zdVqbH7mSY5xQrf0+44qDjB8/7vq5gHW/qpZYuMyJh/q Tucw== X-Gm-Message-State: AFqh2kpwNgmKlovcPBs8dRdDn6MpqBVDx0n8NFcvSfco0z7VliR1THFq NVm39TtfGDW/Tje7PCxirVCZbmArFGv0VHZusble8j3H3Sk= X-Google-Smtp-Source: AMrXdXuDxgLhbXSko/RCRE3pRY7UB3ANgU8CyGNlBpPqAUsLFnSAG5eD6ZWUySqDrKdQWoANPMLIleueGvwCwteOEmM= X-Received: by 2002:a05:6808:b3b:b0:364:865d:2c47 with SMTP id t27-20020a0568080b3b00b00364865d2c47mr113102oij.288.1673458276814; Wed, 11 Jan 2023 09:31:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pavel Stehule Date: Wed, 11 Jan 2023 18:30:40 +0100 Message-ID: Subject: Re: Remove source code display from \df+? To: Magnus Hagander Cc: Isaac Morland , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="00000000000022d6ec05f2005e8d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000022d6ec05f2005e8d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable st 11. 1. 2023 v 18:25 odes=C3=ADlatel Magnus Hagander napsal: > > > On Wed, Jan 11, 2023 at 6:19 PM Pavel Stehule > wrote: > >> >> >> st 11. 1. 2023 v 17:50 odes=C3=ADlatel Isaac Morland >> napsal: >> >>> I find \df+ much less useful than it should be because it tends to be >>> cluttered up with source code. Now that we have \sf, would it be reason= able >>> to remove the source code from the \df+ display? This would make it eas= ier >>> to see function permissions and comments. If somebody wants to see the = full >>> definition of a function they can always invoke \sf on it. >>> >>> If there is consensus on the idea in principle I will write up a patch. >>> >> >> +1 >> >> > +1 but maybe with a twist. For any functions in a procedural language lik= e > plpgsql, it makes it pretty useless today. But when viewing an internal o= r > C language function, it's short enough and still actually useful. Maybe > some combination where it would keep showing those for such language, but > would show "use \sf to view source" for procedural languages? > yes, it is almost necessary for C functions or functions in external languages. Maybe it can be specified in pg_language if prosrc is really source code or some reference. > -- > Magnus Hagander > Me: https://www.hagander.net/ > Work: https://www.redpill-linpro.com/ > --00000000000022d6ec05f2005e8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
st 11. 1. 2023 v=C2=A018:25 odes=C3= =ADlatel Magnus Hagander <magnus@= hagander.net> napsal:


On Wed, Jan 11, 2023 at = 6:19 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:


st= 11. 1. 2023 v=C2=A017:50 odes=C3=ADlatel Isaac Morland <isaac.morland@gmail.com&g= t; napsal:
I find \df+ much less useful than it should=C2=A0be because it = tends to be cluttered up with source code. Now that we have \sf, would it b= e reasonable to remove the source code from the \df+ display? This would ma= ke it easier to see function permissions and comments. If somebody wants to= see the full definition of a function they can always invoke \sf on it.
If there is consensus on the idea in principle I will writ= e up a patch.

+1

=

+1 but maybe with a twis= t. For any functions in a procedural language like plpgsql, it makes it pre= tty useless today. But when viewing an internal or C language function, it&= #39;s short enough and still actually useful. Maybe some combination where = it would keep showing those for such language, but would show "use \sf= to view source" for procedural languages?

yes, it is almost necessary for= C functions or functions in external languages. Maybe it can be specified = in pg_language if prosrc is really source code or some reference.





=C2=A0
--
=C2=A0Magnus Hagander
=C2=A0Me: https://www.hagander.net/
= =C2=A0Work: ht= tps://www.redpill-linpro.com/
--00000000000022d6ec05f2005e8d--