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 1mIE6e-0006ZA-5G for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Aug 2021 17:51:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mIE6c-00089S-2l for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Aug 2021 17:51:30 +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 1mIE6b-00089K-Qq for pgsql-hackers@lists.postgresql.org; Mon, 23 Aug 2021 17:51:29 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mIE6Z-0005LM-1t for pgsql-hackers@lists.postgresql.org; Mon, 23 Aug 2021 17:51:29 +0000 Received: by mail-lf1-x12d.google.com with SMTP id g13so39528057lfj.12 for ; Mon, 23 Aug 2021 10:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tFhnDEZ6vEEAAS12n6jhzixOQZlgOoHbytCOeroDSuc=; b=R45c9O5uHU/MueXFeIGYyE8OkxHXi+BUKL95BJnWUQa9iHg4lMSV0Vj2SqYmXnhaUJ /YoYfmEgoBjZnVv9qRtbOhjITFgVK0ok7csm8FpWu2+G/LYF9QBhnRCmETa1+RG2DBTj HMloXOYhZuMkV5Pnfpndg5AgtITC3jVeBQoYVT0W4i1ASjTS3LSRJiGpwl2v3S54JYpK L6MxXu2EMChGyZDzlx7wmRwSpFI/YkaBmbyVGtWPN/Au3vMbxpMnwCb032Eyqn40v15q cnuV5tOaR3hMKliAuGc6TXGjeAAE3ptyxrlAOB5fi7+7A6mxLYj0jszgaz9h0Ak6LCcf UAGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tFhnDEZ6vEEAAS12n6jhzixOQZlgOoHbytCOeroDSuc=; b=VxltXGPOPRYdaX6yvk8hu6E7YJFAmos8iyYioVwKOxX9bPNdKriM5IecQ4NaEO7RQc cIMqkHmgIi4x6FkMsZsuYh/bUVwgrrEgvnx8Md2TjTaf0tnaNe5SKtzem8BTP+PZDeg/ qTzYli/So5XYWQsJi0kVdopkV7b93Zp9X1vW2Ytpfc4vmmXFAoRrAcmUTeWFM8+LgrEd qcQZxJwXPXPtJg0yeTv+kSjYBLlO8yR5/47K/z96qZQxhgzsQEM5sw+TiwuqCkJRbAjH uBBJ0NtYgEepRvmfv3TTQ5X2uf6ylFIyEHoZVK1JwD3mZDMtGUmeSXvdjNpQ2nLeaUZt C5sw== X-Gm-Message-State: AOAM5318rc29ly3L2vqocRn0Srfl/o6Xrd7kzrnxyUYOwfmjGRsrlpGw S7w5Gog+L6Y+Qz0Ribe8Ia7gnusqyiHnBg== X-Google-Smtp-Source: ABdhPJxJINYzAhL/uAdToFQD9ZpUDkAwNIuzkWhSN8HSZp6I4EPxyU32yg5/078u/SzrZ06Tfm3fmA== X-Received: by 2002:ac2:48bb:: with SMTP id u27mr25156628lfg.212.1629741086103; Mon, 23 Aug 2021 10:51:26 -0700 (PDT) Received: from [192.168.1.3] ([46.138.249.39]) by smtp.gmail.com with ESMTPSA id n3sm1502106lfu.137.2021.08.23.10.51.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Aug 2021 10:51:25 -0700 (PDT) Subject: Re: very long record lines in expanded psql output To: Andrew Dunstan Cc: PostgreSQL Hackers References: <998a8549-f808-a349-bae6-9f44d07e050d@dunslane.net> <4e8b9a10-95aa-aecf-01a1-cbc24d643465@gmail.com> <66d23848-9f73-abc9-2fbb-3b8abfbb2fce@dunslane.net> <0efd52b9-450a-7636-fb75-663bc2d81b34@gmail.com> <92258bb8-8b9d-8f70-6f34-b5499215204c@dunslane.net> From: Platon Pronko Message-ID: Date: Mon, 23 Aug 2021 20:51:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <92258bb8-8b9d-8f70-6f34-b5499215204c@dunslane.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi! Please find attached the patch implementing the proposed changes. I hope I didn't forget anything (docs, tab completion, comments, etc), if I did forget something please tell me and I'll fix it. Best regards, Platon Pronko On 2021-08-08 01:18, Andrew Dunstan wrote: > > On 8/7/21 10:56 AM, Platon Pronko wrote: >> Hi! >> >>>>>>> I also find this annoying and would be happy to be rid of it. >>>>>> >>>>>> Have you tried "\pset format wrapped"? Pavel suggested it, and it >>>>>> solved most of the problem for me, for example. >>>>> >>>>> Yes, but it changes the data line output. Ideally, you should be able >>>>> to  modify these independently. >>>> >>>> I agree, and I think this can be implemented, but I'm a bit afraid of >>>> introducing an additional psql option (there's already quite a lot of >>>> them). >>>> I suspect primary PostgreSQL maintainers won't be happy with such an >>>> approach. >>>> >>>> >>> >>> I think I qualify as one of those ... :-) >> >> Sorry, I'm new here, don't know who's who :) > > > No problem. Welcome! We're always very glad to see new contributors. > > >> >> I'll start working on a new patch then. A couple questions about >> specifics: >> >> 1. Can we add "expanded" in the option name, like >> "xheader_expanded_width"? >> I think adjusting the header row width doesn't make sense on any other >> modes, >> and placing that in the option name makes intent a bit clearer. > > > > "xheader" was meant to be shorthand for "expanded output header" > > >> >> 2. What was "column" option in your original suggestion supposed to do? >> ("\pset xheader_width column|page|nnn") > > > It's meant to say don't print anything past the column spec, e.g.: > > > -[ RECORD 1 ]----+ > n | 42 > long_column_name | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > -[ RECORD 2 ]----+ > n | 210 > long_column_name | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > >> >> 3. Should we bother with using this option when in "\pset border 2" mode? >> I can do it for consistency, but it will still look bad. >> >> > > Probably not, but since I never use it I'll let others who do weigh in > on the subject. > > > cheers > > > andrew > > > -- > Andrew Dunstan > EDB: https://www.enterprisedb.com >