From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
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> (raw)
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
Attachments:0001-psql-tab-complete-time-zones-after-AT-TIME-ZONE.patch (text/x-diff, 1013B) download
From 57138e851552a99174d00a0e48ce55ca3170df75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
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.cindex 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ilmari@ilmari.org
Subject: Re: Tab completion for AT TIME ZONE
In-Reply-To: <87jzyzsvgv.fsf@wibble.ilmari.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox