Skip site navigation (1) Skip section navigation (2)

EXECUTE tab completion

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: EXECUTE tab completion
Date: 2011-09-26 21:03:07
Message-ID: 4E80E88B.4040704@proxel.se (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

Magnus's patch for adding tab completion of views to the TABLE statement 
reminded me of a minor annoyance of mine -- that EXECUTE always 
completes with "PROCEDURE" as if it would have been part of CREATE 
TRIGGER ... EXECUTE even when it is the first word of the line.

Attached is a simple patch which adds completion of prepared statement 
names to the EXECUTE statement.

What could perhaps be added is that if you press tab again after 
completing the prepared statement name you might want to see a single 
"(" appear. Did not add that though since "EXECUTE foo();" is not valid 
syntax (while "EXECUTE foo(1);" is) and I did not feel the extra lines 
of code to add a query to check if the number of expected parameters is 
greater than 0 were worth it.

-- 
Andreas Karlsson

Attachment: execute-completion.diff
Description: text/x-patch (1.3 KB)

Responses

pgsql-hackers by date

Next:From: Jeff JanesDate: 2011-09-26 21:07:54
Subject: Re: psql setenv command
Previous:From: Kohei KaiGaiDate: 2011-09-26 20:41:30
Subject: Re: [v9.2] Fix Leaky View Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group