Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fiN1u-0004B0-N4 for pgsql-general@arkaria.postgresql.org; Wed, 25 Jul 2018 16:52:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fiN1s-0002sb-Vv for pgsql-general@arkaria.postgresql.org; Wed, 25 Jul 2018 16:52:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fiN1s-0002sU-NG for pgsql-general@lists.postgresql.org; Wed, 25 Jul 2018 16:52:48 +0000 Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fiN1k-0008Ll-4c for pgsql-general@postgresql.org; Wed, 25 Jul 2018 16:52:48 +0000 Received: by mail-qt0-x230.google.com with SMTP id b15-v6so8286985qtp.11 for ; Wed, 25 Jul 2018 09:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=+jE7V8KtuIaeYLjejZwoaPMuRNWD4KrWzrFYgAE0Vig=; b=nbsA+clYMd6+WEHWybS/5TzhoZdiupDD/IJjZrsasMea0Ca5lHbGQIMYZzzk4A0xXO FmYO1PQy90onGlTRREkT7FPuPs1Ka7xB6j/vEwF0AjKXbLr8zXrebr0AAoGe7AtWVZfP kClQU6+2VXgzEPNW+IIP08U7njNLMtqcQ/AQLVmR45l/7zOQpcWf59HN435WrcCjMh0d OsdHH4HlB+C0gXz012iO3ybTsDIstdwu0kR5F3s5z6pjUOWHtaIGkFN38GUf+1zEgKtU qgKQqb0GFcGFCp7qdkLmCg9csxITZ94RipH0QbTr1Bl75MnCgb1S/oDoQy7AL1lKrqJJ dhsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=+jE7V8KtuIaeYLjejZwoaPMuRNWD4KrWzrFYgAE0Vig=; b=I2iFy9iLTfh18xdiq0EVvIC9vPsGxtbXo3ujM7DEKbTwdaojIyekYaUKlHRo23GRAb Mn0fikco7+yUp5YaZn/hYanRxt6J0SutXTiy8iaiSsKF651OMmlWxc6Cta6zNzPpzDkR HoAbzyQUIki6npDeXyh+H3XAa5WFD5ZveBRHawY28w+abRPltPlCHkQBMpqMiVLgcETt uwn7EXsP9Ry8DB6tV6hFJ0XQa9fdKvGEkmU+vPWVFbS4G2/jqBpmj8lEcx8oJEz2wSqU c4llJhco7zE0eGlGPylS90GnSlMJgQR+kC5/DIt8NAFlqw7xiG+uv73606LlZVQYP16l s55A== X-Gm-Message-State: AOUpUlHclJqMVjKBL+XD+AxKPYulfMPguOf+y9Og/cONy1mDmzQ76z5y ohRpfAml9sVRNoAtp7qOAkcoyw== X-Google-Smtp-Source: AAOMgpfEzRkk8rsL1NdBVftIOvUa+AuASRRohxQJJtxEeVVqap1PVF8iyOwKsjv34ZFk8G37XKuCbQ== X-Received: by 2002:a0c:86b3:: with SMTP id 48-v6mr19464416qvf.64.1532537558535; Wed, 25 Jul 2018 09:52:38 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.56.48.71]) by smtp.gmail.com with ESMTPSA id w13-v6sm12310777qtc.88.2018.07.25.09.52.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 09:52:38 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 3821E4ED; Wed, 25 Jul 2018 12:52:36 -0400 (-04) Date: Wed, 25 Jul 2018 12:52:36 -0400 From: Alvaro Herrera To: David Gauthier Cc: pgsql-general@postgresql.org Subject: Re: Need text wrapping inside a column to avoid record wrapping (tabular output of 'select') Message-ID: <20180725165236.w2jxbvetk47c4tjk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Jul-25, David Gauthier wrote: > Hi: > > psql (9.6.7, server 9.1.9) on RHEL6 > > In order to avoid record wrapping in the tabular output of a "select" > statement, I need to limit the width of certain columns. For those > columns, I would like to have text wrapping so as not to lose any > information (IOW, I don't want to simply truncatate and lose info). \pset format wrapped It doesn't break on whitespace though. $ 999,00 │ Nine hundred ninety nine dollars and z… │…ero cents $ 1.000,…│ One thousand dollars and zero cents … 00 │ -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services