#536815 postgresql-client-8.3: local db tab completion for psql

Package:
bash-completion
Source:
bash-completion
Submitter:
Faheem Mitha
Date:
2021-09-22 17:15:02 UTC
Severity:
wishlist
Tags:
#536815#5
Date:
2009-07-13 18:24:59 UTC
From:
To:
Hi,

I have been using a machine, still running etch, where tab completion
for local dbs works.

faheem@ccis2753:~$ dpkg -l postgresql-client-8.3
[...]
ii  postgresql-client-8.3          8.3.5-1~bpo40+1 front-end programs for PostgreSQL 8.3

faheem@ccis2753:~$ psql --version
psql (PostgreSQL) 8.3.5
contains support for command-line editing
faheem@ccis2753:~$ psql [tab]
btsnp_full_genome        btsnp_full_genome_copy2  btsnp_test  template0
btsnp_full_genome_copy   btsnp_full_genome_trunc  postgres  template1

However, this doesn't work for other machines I've tried, machines now
mostly running 8.3 on lenny. Do you know what is going on here? I
tried IRC (#postgresql on freenode), but they don't seem to be
interested.

There are some lines in the changelog about this, but not very
specific.

faheem:/usr/share/doc/postgresql-client-8.3$ zgrep completion *
[...]
changelog.gz:     * Improve tab completion support (Stefan Kaltenbrunn, Greg Sabino
changelog.gz:     * Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)

                                                                   Regards, Faheem.

#536815#10
Date:
2009-07-13 20:33:46 UTC
From:
To:
[snip]

It looks like this facility was recently disabled in the bash-completion
package, so feel free to close this bug. I'll leave it open for now in
case you want to offer any feedback.

                                                          Regards, Faheem.

#536815#15
Date:
2009-07-14 06:33:52 UTC
From:
To:
reassign 536815 bash-completion 20080617.4
thanks

Hello Faheem,

Faheem Mitha [2009-07-13 14:24 -0400]:

As you already discovered yourself, this was disabled in
bash-completion, so I reassing this wishlist bug to bash-completion.
Maintainers, please close/wontfix as you see fit (I don't know the
reason why it was disabled).

Speaking as the psql maintainer, figuring out all local databases
correctly (and mapping them to their cluster) is really nontrivial,
so perhaps it was done because the completion was too bad?

Thanks,

Martin

#536815#22
Date:
2009-07-14 08:29:50 UTC
From:
To:
FYI, these items relate to the tab completion of the SQL language within the
psql program, not the completion of arguments to the psql program in the
shell.

#536815#27
Date:
2009-07-14 14:49:00 UTC
From:
To:
Hi Martin,

Thanks for your quick reply, on your work on the Debian postgresql
package.

Well, no disrespect intended, but the reason for disabling this feature is
because it doesn't work perfectly? Now hitting tab gives all the files in
the directory. How is that better?

To the bash completion maintainers:

please consider renabling this functionality. There was no reason given
for the original disabling. It looks like this change was made in Ubuntu
first, and copied to Debian. If there is a Ubuntu bug or a discussion in
the ML is would have been helpful to link to it. For one thing, is would
make requests like this less likely.

Otherwise, is there some way to reenable this functionality locally?

                                               Regards, Faheem Mitha.

#536815#32
Date:
2009-07-14 18:15:56 UTC
From:
To:
http://ubuntuforums.org/showthread.php?t=613499
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/164772

Disclaimer: I have nothing to do with Ubuntu or Debian nor have a strong
opinion on the issue - the argument in the Ubuntu bug tracker seems quite
valid to me though.  I've added a pointer to that bug in sources and CHANGES
in git.

See the _pg_databases and _pg_users completion functions.

#536815#39
Date:
2011-01-06 22:54:58 UTC
From:
To:
I left a comment at the launchpad bug.  There is now a way to fix this.
#536815#44
Date:
2021-09-22 17:13:42 UTC
From:
To:
Meu caro amigo, elogios a você e toda sua família.

Meu nome é Sra. Sophia Brown dos EUA, uma viúva que sofre de doença de
câncer, estou escrevendo este e-mail com lágrimas graves nos olhos e
muita dor no coração. Decidi entrar em contato com você por causa da
urgência da minha situação.

Minha querida, quero doar US$ 6,5 milhões para caridade. projetos em
seu país, também parte desse dinheiro será doado aos pobres e menos
privilegiados em seu país. Por favor, responda por mais detalhes.

Sophia J. Brown