Thread

Commits

  1. Improve tab completion of IMPORT FOREIGN SCHEMA with \h in psql

  1. psql tab completion for \h with IMPORT FOREIGN SCHEMA

    Michael Paquier <michael@paquier.xyz> — 2021-03-18T06:58:46Z

    Hi all,
    
    Well, as $subject tells, I just found confusing that \h does not
    complete the so-said command, the only one using IMPORT as keyword,
    so I'd like to do the following:
    --- a/src/bin/psql/tab-complete.c
    +++ b/src/bin/psql/tab-complete.c
    @@ -1493,7 +1493,7 @@ psql_completion(const char *text, int start, int end)
             "ABORT", "ALTER", "ANALYZE", "BEGIN", "CALL", "CHECKPOINT", "CLOSE", "CLUSTER",
             "COMMENT", "COMMIT", "COPY", "CREATE", "DEALLOCATE", "DECLARE",
             "DELETE FROM", "DISCARD", "DO", "DROP", "END", "EXECUTE", "EXPLAIN",
    -        "FETCH", "GRANT", "IMPORT", "INSERT", "LISTEN", "LOAD", "LOCK",
    +        "FETCH", "GRANT", "IMPORT FOREIGN SCHEMA", "INSERT", "LISTEN", "LOAD", "LOCK",
             "MOVE", "NOTIFY", "PREPARE",
             "REASSIGN", "REFRESH MATERIALIZED VIEW", "REINDEX", "RELEASE",
             "RESET", "REVOKE", "ROLLBACK",
    
    That's not the patch of the year.
    
    Thanks,
    --
    Michael
    
  2. Re: psql tab completion for \h with IMPORT FOREIGN SCHEMA

    Julien Rouhaud <rjuju123@gmail.com> — 2021-03-18T07:13:17Z

    On Thu, Mar 18, 2021 at 03:58:46PM +0900, Michael Paquier wrote:
    > 
    > Well, as $subject tells, I just found confusing that \h does not
    > complete the so-said command, the only one using IMPORT as keyword,
    > so I'd like to do the following:
    > --- a/src/bin/psql/tab-complete.c
    > +++ b/src/bin/psql/tab-complete.c
    > @@ -1493,7 +1493,7 @@ psql_completion(const char *text, int start, int end)
    >          "ABORT", "ALTER", "ANALYZE", "BEGIN", "CALL", "CHECKPOINT", "CLOSE", "CLUSTER",
    >          "COMMENT", "COMMIT", "COPY", "CREATE", "DEALLOCATE", "DECLARE",
    >          "DELETE FROM", "DISCARD", "DO", "DROP", "END", "EXECUTE", "EXPLAIN",
    > -        "FETCH", "GRANT", "IMPORT", "INSERT", "LISTEN", "LOAD", "LOCK",
    > +        "FETCH", "GRANT", "IMPORT FOREIGN SCHEMA", "INSERT", "LISTEN", "LOAD", "LOCK",
    >          "MOVE", "NOTIFY", "PREPARE",
    >          "REASSIGN", "REFRESH MATERIALIZED VIEW", "REINDEX", "RELEASE",
    >          "RESET", "REVOKE", "ROLLBACK",
    
    Looks sensible to me.
    
    
    
    
  3. Re: psql tab completion for \h with IMPORT FOREIGN SCHEMA

    gkokolatos@pm.me — 2021-03-18T07:45:36Z

    
    
    
    
    ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
    On Thursday, March 18, 2021 8:13 AM, Julien Rouhaud <rjuju123@gmail.com> wrote:
    
    > On Thu, Mar 18, 2021 at 03:58:46PM +0900, Michael Paquier wrote:
    >
    > > Well, as $subject tells, I just found confusing that \h does not
    > > complete the so-said command, the only one using IMPORT as keyword,
    > > so I'd like to do the following:
    > > --- a/src/bin/psql/tab-complete.c
    > > +++ b/src/bin/psql/tab-complete.c
    > > @@ -1493,7 +1493,7 @@ psql_completion(const char *text, int start, int end)
    > > "ABORT", "ALTER", "ANALYZE", "BEGIN", "CALL", "CHECKPOINT", "CLOSE", "CLUSTER",
    > > "COMMENT", "COMMIT", "COPY", "CREATE", "DEALLOCATE", "DECLARE",
    > > "DELETE FROM", "DISCARD", "DO", "DROP", "END", "EXECUTE", "EXPLAIN",
    > >
    > > -          "FETCH", "GRANT", "IMPORT", "INSERT", "LISTEN", "LOAD", "LOCK",
    > >
    > >
    > >
    > > -          "FETCH", "GRANT", "IMPORT FOREIGN SCHEMA", "INSERT", "LISTEN", "LOAD", "LOCK",
    > >            "MOVE", "NOTIFY", "PREPARE",
    > >            "REASSIGN", "REFRESH MATERIALIZED VIEW", "REINDEX", "RELEASE",
    > >            "RESET", "REVOKE", "ROLLBACK",
    > >
    > >
    >
    > Looks sensible to me.
    
    
    It seems helpful. Thank you.
    
    
    
    
    
  4. Re: psql tab completion for \h with IMPORT FOREIGN SCHEMA

    Michael Paquier <michael@paquier.xyz> — 2021-03-19T00:23:47Z

    On Thu, Mar 18, 2021 at 07:45:36AM +0000, gkokolatos@pm.me wrote:
    > It seems helpful. Thank you.
    
    Thanks, applied then.
    --
    Michael