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 1phT3e-00065U-QW for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Mar 2023 10:29:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1phT3d-0003xb-Nn for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Mar 2023 10:29:33 +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 1phT2I-00086C-Im for pgsql-hackers@lists.postgresql.org; Wed, 29 Mar 2023 10:28:11 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phT2D-0002sm-En for pgsql-hackers@postgresql.org; Wed, 29 Mar 2023 10:28:10 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E9A355C0193 for ; Wed, 29 Mar 2023 06:28:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 29 Mar 2023 06:28:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1680085682; x=1680172082; bh=A725kaTp8rdoQRWtsvwPdnCfI FlYq4YdGNyJMWrAGBM=; b=JbEY1Ll0UiD92nJS2c6n3z5aJ3PT7UGus+YZMRIF3 5jK4F6GHQrnmXrHHSsULpxj0+M3iLASzvwC7ohiFnFA/uRPI4QIsqUttmco3yMbl Z3G89sDoBlu7FPBnVziwXPWRiWmgND8eVyyBSlhb47sotW+apCpzM9S245s1ygHV bDv7WEhQq34Sb8DCpvlMbXg0Ad7a8+kmWhoEXqsyW21k+HS0KcAEyZctWM1nOZtK hAnDznG9T0TqWkVlkwwg8PEEQeHSZDf81LAVH9KS4wsurLIOn0sXPecdZD/mkZyI R25gC9LiwZsU+enaHxioqmhMdBIWWiDP7fIb8s9zXuSiw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1680085682; x=1680172082; bh=A725kaTp8rdoQRWtsvwPdnCfIFlYq4YdGNy JMWrAGBM=; b=jvHcIDhtfGGLaeQiHLIJsgiDufi2LHTkwLlulz/ItLaJ4Hhj/oH R6xHiE4F9P9PFJtyuWegcXPqobIIs8JsUbhG3KpS3Q394iAJE3yrlWh6WT6POhuB 6yQ6eYSyT/NMXaRdflsVQYvQy3DTPLlU4nr5G0ymjs/TR5iaz4b0NUsLiaQIjohE Pd85BT/oAGGGhFGHmpAXO/Hti+rP+7HJW7IN6Dn7Vyj9kW+GNu9KxaGisnTRw3yy G/fPQzJymGIfrFZXf9gmLJtA0OLwm3fEmEfIZeXNsYt2iDN/Qq6MyUP1N9JjFTtd an2sBs/hDbnUJkR++qg32OYCVjlmUTQlASg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehiedgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesmhdtreertd erjeenucfhrhhomhepffgrghhfihhnnhcukfhlmhgrrhhiucforghnnhhsnohkvghruceo ihhlmhgrrhhisehilhhmrghrihdrohhrgheqnecuggftrfgrthhtvghrnhepieeiveetvd euveevkeefueejieekgfdvtdetffekgeejtedvjeetheehueeliedvnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrg hrihdrohhrgh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 29 Mar 2023 06:28:02 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: pgsql-hackers@postgresql.org Subject: Tab completion for AT TIME ZONE Date: Wed, 29 Mar 2023 11:28:00 +0100 Message-ID: <87jzyzsvgv.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Hi hackers, A while back we added support for completing time zone names after SET TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. Here's a trivial patch for that. - ilmari --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-psql-tab-complete-time-zones-after-AT-TIME-ZONE.patch From 57138e851552a99174d00a0e48ce55ca3170df75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= Date: Wed, 29 Mar 2023 11:16:01 +0100 Subject: [PATCH] psql: tab-complete time zones after AT TIME ZONE Commit 7fa3db367986160dee2b2b0bbfb61e1a51d486fd added support for completing time zone names, use that after the AT TIME ZONE operator. --- src/bin/psql/tab-complete.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index e38a49e8bd..9bb8ae0dc3 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -4655,6 +4655,10 @@ psql_completion(const char *text, int start, int end) else if (TailMatches("JOIN")) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_selectables); +/* ... AT TIME ZONE ... */ + else if (TailMatches("AT", "TIME", "ZONE")) + COMPLETE_WITH_TIMEZONE_NAME(); + /* Backslash commands */ /* TODO: \dc \dd \dl */ else if (TailMatchesCS("\\?")) -- 2.39.2 --=-=-=--