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 1mBi8n-0003Sp-6N for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Aug 2021 18:30:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mBi8m-0004Jz-4b for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Aug 2021 18:30:48 +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 1mBi8l-0004Jr-Sv for pgsql-hackers@lists.postgresql.org; Thu, 05 Aug 2021 18:30:47 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mBi8j-0006ir-Vk for pgsql-hackers@lists.postgresql.org; Thu, 05 Aug 2021 18:30:47 +0000 Received: by mail-lf1-x134.google.com with SMTP id c24so9619971lfi.11 for ; Thu, 05 Aug 2021 11:30:45 -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=mVq+Z7LVQywP3TfiA5/0/ou1ZokO3n4In0nLL2SOaZc=; b=ShD1HyIcS/bVdzzSR1pgpqPHTo5mQIuk+yO3iLCdIYJ+NMlzTiUJ49sv7noYbhW7KJ Ufhh+yTef6wrRUarfugbJsHKgrirw1MqF7Z4nLVcQ0VFO0kApCN3KKA+5T7sa1x6V7cf 0Z8hf4GgVo0CZkP/JbW/GO6fAefTdx6SLXrUmkLeEL7id/EJuRGzkPcDCQtsH++dj0D0 0FvAaTuVufnaFXE0dKtE7dy4afukWNBeXjVJXKyH9KRXeiDF9eGytiGtB7P2T9N3jyiu RMD836OIqmeXn6n3ie+oxlDNEzoD9EVg5pWW/mMIdeVHiQSKZzAD5yCqcpa2p947aMdQ N8cw== 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=mVq+Z7LVQywP3TfiA5/0/ou1ZokO3n4In0nLL2SOaZc=; b=tXzynOn/K4xrKb6Wuo1aIJpF0QiNToVraMzDWWRq7gcUUS/dFwOJy6cmC5PorWu++6 UgkK5q4iJb6EAc5IYk2+ngOObgHfYZtW7n9a1Ey+uBlAl+AdTonn/BdWk7r0rmVhQjZS JLKu5z+iZ3FdGJ1gKra6XYKpvK90rlLTvO+lC06ROHGZz7MgjMKatlx3gVxr/jmYZ07B sPTLHqhv1TuTasRpIHZ5/RvO41ZKOgGSKvtccELqdy9Fqgfs7fUTe0Ucbj/JsZyQKd9a U97mYcBM7rqCJ7OMjcja+Cuu1mUqtJIXzMVUq82c9P0htRTMEP47F9SDBNufjTApW+Pg Doyg== X-Gm-Message-State: AOAM531YdAgZeHu3wQ4Je/keLwrdJ1/IuEJMomZn7SLqHhILYLCPpzNa n8vsWP0YpPhF3Hlb9k2l6z6L1Px/COs= X-Google-Smtp-Source: ABdhPJw+Gryr6JlqgutDIFz0Lqxmw5ECgthMvGdgZytvN4rixXQTLHfIN5F9Q53lbUJwPvxiccbsag== X-Received: by 2002:a05:6512:2205:: with SMTP id h5mr4869006lfu.317.1628188245092; Thu, 05 Aug 2021 11:30:45 -0700 (PDT) Received: from [192.168.1.3] ([46.138.249.39]) by smtp.gmail.com with ESMTPSA id bd23sm469695ljb.32.2021.08.05.11.30.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Aug 2021 11:30:44 -0700 (PDT) Subject: Re: very long record lines in expanded psql output To: Pavel Stehule Cc: Andrew Dunstan , PostgreSQL Hackers References: <998a8549-f808-a349-bae6-9f44d07e050d@dunslane.net> <4e8b9a10-95aa-aecf-01a1-cbc24d643465@gmail.com> From: Platon Pronko Message-ID: Date: Thu, 5 Aug 2021 21:30:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. >> > > it can be a fully new format - designed for simple copy from terminal. Some > like > > ====== record: 10 ====== > ------------ proname ------------ > left > ------------ prosrc ------------ > $lalalal > ewqrwqerw > ewqrwqerqrewq > $ > =============== I don't think that would be a good idea. If somebody really just needs to copy, then wrapping the query in "copy (...) to stdout" already works nicely, no need to create a special mode just for that. I think the question was more about being able to copy in an ad-hoc way, in the middle of scrolling trough "normal" output. Best regards, Platon Pronko