Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hd10b-0007Or-RN for pgsql-general@arkaria.postgresql.org; Mon, 17 Jun 2019 23:25:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hd0zc-0001lg-EU for pgsql-general@arkaria.postgresql.org; Mon, 17 Jun 2019 23:24:52 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hd0zc-0001lY-4W for pgsql-general@lists.postgresql.org; Mon, 17 Jun 2019 23:24:52 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hd0zX-00045j-H1 for pgsql-general@postgresql.org; Mon, 17 Jun 2019 23:24:51 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E52C622345; Mon, 17 Jun 2019 19:24:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 17 Jun 2019 19:24:44 -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=N dyXNiesrXNWPxcod+Tl7hVsx9VvSgoBoqhgfn2da4c=; b=R7MP4yA19yca+vQf3 GyXTTDu7v+TszPD2SLyIMuiDJUIwyWamBneYTHDcZWo9CUmHCI8X9M7Dr/mYPG+J 9tLgh+Fy3YJiKvezRtuy1mi8Il0G361JQGSgtMpBnXz9EUKuAeprukUytw1X51Rb iX6iu9XdPr7FNba+nT6u1qwAgOK+CzJkw+jzaDxiRiD97l0rWSKQqVWD2NNN9mW4 hg9vwhB4lqoc0YKn/JfD7EgzP3jwVj1FSRfUQQk6LMOeZnRKCiuKZu0eDk0lAzzW 2AHZ8Ome+BD9lEJoIOcyUxnzaTdTE0BVqFaz3hy2vXTGEuZoJQQgFexpF+Hwwir6 4MT2A== 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=NdyXNiesrXNWPxcod+Tl7hVsx9VvSgoBoqhgfn2da 4c=; b=pfTEnFGbGg6yzf7nll48d/JqXKvu1aLCcHRXg9YAtrtLC0rTeZ+NGmn+S EwCNdIB6k4r7VCrziKRWJm+EZW9iIinDlPYkibKytQQ77cutZjdEaE2yNQOStnmg m+xiynmJ1pz80WdgalbZIL0RR6es30vQHRFU9qFPi0OW7+ncvEKOUBIZOyLk0UW7 /ehMXIVNSYsH9tS6H8PiinXxcl35f6RuLNYG5/Jam1WJJPvxTiKzwYGlbZ7DXgkh lfmzm5vghnf5EN6eAfZIBgJ06bIa/yyIXexvpc8sArkM3w6p3BtaAqhaskFSTCgl 1alHu4lwlpDYSKV1mNZtJITKqLLKA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeikedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinheprghgvghntgihqdhsohhfthifrghrvgdrohhrghenucfkphep jedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrih grnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgep td X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 1E6D88005A; Mon, 17 Jun 2019 19:24:44 -0400 (EDT) Subject: Re: psql UPDATE field [tab] expands to DEFAULT? To: Ken Tanzer , PG-General Mailing List References: From: Adrian Klaver Message-ID: Date: Mon, 17 Jun 2019 16:24:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: 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: Precedence: bulk On 6/17/19 3:03 PM, Ken Tanzer wrote: > Hi.  If I'm using psql, and type for example: > > UPDATE my_table SET my_field > (with a trailing space) > > and then hit Tab, it will expand that to an =, and then another tab will > expand to DEFAULT, so that I then have: > > UPDATE my_table SET my_field = DEFAULT > > If I'm tabbing out in this situation, it's going to be after the =, and > I will have typed "myreal"[tab] in the vain hope that psql will complete > that to "myreallylongfieldname," but instead it gets replaced with DEFAULT. > > So I'm curious if this is intended behavior, if it's considered useful, > and/or if it's a placeholder for something in the future that will be > useful.  Also, is this new, as I've never noticed it before? Not sure how long that has been around. My cheat for dealing with many/long column names is: test=# \d up_test Table "public.up_test" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- id | integer | | | col1 | boolean | | | col2 | integer | | | test=# \pset format unaligned Output format is unaligned. test=# \pset fieldsep ',' Field separator is ",". select * from up_test limit 0; id,col1,col2 Cut and paste above. test=# \pset fieldsep '|' Field separator is "|". test=# \pset format 'aligned' Output format is aligned. > > Thanks in advance, > Ken > > p.s.,  Version 9.6.13 > > -- > AGENCY Software > A Free Software data system > By and for non-profits > /http://agency-software.org// > /https://demo.agency-software.org/client/ > ken.tanzer@agency-software.org > (253) 245-3801 > > Subscribe to the mailing list >  to > learn more about AGENCY or > follow the discussion. -- Adrian Klaver adrian.klaver@aklaver.com