patch: CREATE OR REPLACE FUNCTION autocomplete
Started by Pavel Stehulealmost 14 years ago2 messages
Hello
other very simple patch - enhance autocomplete to support CREATE OR
REPLACE FUNCTION statement
Regards
Pavel Stehule
Attachments:
autocomplete-create-or-replace-function.difftext/x-patch; charset=US-ASCII; name=autocomplete-create-or-replace-function.diffDownload
*** ./src/bin/psql/tab-complete.c.orig 2012-02-19 20:05:05.000000000 +0100
--- ./src/bin/psql/tab-complete.c 2012-02-19 20:20:43.817202512 +0100
***************
*** 644,649 ****
--- 644,650 ----
{"INDEX", NULL, &Query_for_list_of_indexes},
{"OPERATOR", NULL, NULL}, /* Querying for this is probably not such a
* good idea. */
+ {"OR REPLACE FUNCTION", NULL, &Query_for_list_of_functions},
{"OWNED", NULL, NULL, THING_NO_CREATE}, /* for DROP OWNED BY ... */
{"PARSER", Query_for_list_of_ts_parsers, NULL, THING_NO_SHOW},
{"ROLE", Query_for_list_of_roles},
Re: patch: CREATE OR REPLACE FUNCTION autocomplete
On sön, 2012-02-19 at 20:23 +0100, Pavel Stehule wrote:
other very simple patch - enhance autocomplete to support CREATE OR
REPLACE FUNCTION statement
I see two problems with this:
- We also have other CREATE OR REPLACE variants that this won't
complete.
- It won't complete something like CREATE OR R<tab>, only CREATE O<tab>.
That would be pretty weird. I think you need to complete each word
separately for consistent behavior.