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 1m5YgR-0001f2-Mm for pgsql-general@arkaria.postgresql.org; Mon, 19 Jul 2021 19:12:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5YgP-00011r-ID for pgsql-general@arkaria.postgresql.org; Mon, 19 Jul 2021 19:12:05 +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 1m5YgO-00011d-2T for pgsql-general@lists.postgresql.org; Mon, 19 Jul 2021 19:12:05 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5YgC-0002oh-UU for pgsql-general@lists.postgresql.org; Mon, 19 Jul 2021 19:12:03 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id CFC3D32002FB; Mon, 19 Jul 2021 15:11:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 19 Jul 2021 15:11:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=G A7yUag1YiNUEpTePFWfelY+LQFnQXRV/tKdsYq2gp4=; b=HURDxEO7iTTh76fiD aoQBG5zPtpOSKnVnYqNvyyfh7u2UZ20GbAsYBbBd0luvGyCVp7BthTMQEH+vVyPn I3zdCi6X8EJ97y8sWqTUszYnNRuyxkVAEwcTSXHSeOiPTtfS58ztB9i2OELUlk5h gQW/kYxAWaT+CzwhwKOxVrjMGyvaasUdututwZfWbnv0oNubFbHRFxhVrktUfjTf wr2s0MNHEr4mVJ88kw3nEVuR21jV93uVKeZr2fRUb/AfQf61Y21gnoV42GOr5hYb 9q0WIQbkZIFmBwkA1C6cWDAR+HEKoppzwcU6UuNutpwzzLVENx+GAJ5cskxTSUaX 8PNng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=GA7yUag1YiNUEpTePFWfelY+LQFnQXRV/tKdsYq2g p4=; b=i25T5ER9pPZjyvXUSqnSX1eoIndp961/agDuMmr+bp0mhGrSFc1BzHUcT tRQZndAb6WleQkP0FjE6h3nCPnJdTacElIB3SVxzLZbHLZ2Ud2KNa91DC5QgN9r9 bIGk3KV6FN3lbnsPx/OwjSDkatcLWmBqOC0H0MXFdMPQRwzwMNkGPAoNqT7liV+y v3DHYGooNi/5+7iTxxp4Wbz0wHoKTKSLiz8v/vG0G7V+mm+TajAgHPsFiQaJG9JX Wz8NzeuDmrfL74H+NCz2S9ugd6A2jK6vEDFOtAhjU+Cg72MSSxgByfVemCyfVTag CohTnr1M8Q495+aqGL26HMAjYRVkg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedtgddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeetjedvteffjeeuvdelieeffeehuedthffgvdfhhffh kedvudevgedvjedufefgveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jul 2021 15:11:48 -0400 (EDT) Subject: Re: Formating psql query output To: Rich Shepard , pgsql-general@lists.postgresql.org References: <4f001abb-7f6d-d098-ed10-1c5445c0ba1c@aklaver.com> From: Adrian Klaver Message-ID: Date: Mon, 19 Jul 2021 12:11:48 -0700 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 On 7/19/21 11:58 AM, Rich Shepard wrote: > On Mon, 19 Jul 2021, Adrian Klaver wrote: > >> Is there a reason you can't just restrict the query to the columns you >> want? > > Adrian, > > As far as I know I need to specify FK and PK columns when tables are > joined; You need them in the JOIN and/or WHERE sections, but not necessarily in the field list in the SELECT portion. > I don't need those key columns in the output. > > Thanks, > > Rich > > -- Adrian Klaver adrian.klaver@aklaver.com