Maybe we can tab-complete here if prefix matches pg_% ? Does that makes good use case?
I think you will have to get much more specific than pg_ before tab completion makes sense. You are still looking at hundreds of answers. The example upthread could benefit from tab completion (pg_stat_st<TAB>) but where does one programmatically draw the line? (digs around). Looks like pg_<single-letter><TAB> could be useful - while pg_s has ~ 150 entries, everything else is doable:
greg=# with alpha as (select chr(x) from generate_series(97,122) x)
select chr, count(*) from pg_proc, alpha where proname ~ ('pg_'||chr) group by 1 order by 1;
chr | count
-----+-------
a | 17
b | 15
c | 43
d | 14
e | 11
f | 4
g | 41
h | 7
i | 18
j | 1
k | 4
l | 46
m | 6
n | 14
o | 4
p | 9
q | 5
r | 35
s | 150
t | 38
v | 6
w | 6
x | 3
-- Cheers,
Greg
--
Enterprise Postgres Software Products & Tech Support