Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ... - Mailing list pgsql-hackers

From zengman
Subject Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...
Date
Msg-id tencent_5CE6C0BC7A6DFDA628286773@qq.com
Whole thread Raw
In response to Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...  (VASUKI M <vasukianand0119@gmail.com>)
List pgsql-hackers
Hi,

I got lots of indentation-related warnings when running git apply (see output below). 
Also, I found an issue: the RESET command unexpectedly displays "work_mem=16MB", 
which is not correct. I've made a minor fix by adding split_part and attached the v3 patch.

```
postgres@zxm-VMware-Virtual-Platform:~/code/postgres$ git apply
v2-0001-psql-alter-role-in-database-tab-completion.patch
v2-0001-psql-alter-role-in-database-tab-completion.patch:67: indent with spaces.
            /* ALTER ROLE bob IN DATABASE <TAB> → list databases */
v2-0001-psql-alter-role-in-database-tab-completion.patch:68: indent with spaces.
            COMPLETE_WITH_QUERY(Query_for_list_of_databases);
v2-0001-psql-alter-role-in-database-tab-completion.patch:73: indent with spaces.
            /* ALTER ROLE bob IN DATABASE mydb <TAB> → SET, RESET */
v2-0001-psql-alter-role-in-database-tab-completion.patch:74: indent with spaces.
            COMPLETE_WITH("SET", "RESET");
v2-0001-psql-alter-role-in-database-tab-completion.patch:79: indent with spaces.
            /* ALTER ROLE bob IN DATABASE mydb SET <TAB> */
warning: squelched 37 whitespace errors
warning: 42 lines add whitespace errors.
```

```
postgres=# ALTER ROLE postgres IN DATABASE postgres SET work_mem = '16MB';
ALTER ROLE
postgres=# ALTER ROLE postgres IN DATABASE postgres RESET 
ALL              "work_mem=16MB"  
```

Could you please take a look and see if this modification is correct?

--
Regards,
Man Zeng
www.openhalo.org
Attachment

pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: RFC: PostgreSQL Storage I/O Transformation Hooks
Next
From: "zourenli"
Date:
Subject: [PATCH v1] replindex: Fix comment grammar in build_replindex_scan_key()