0

I have installed postgresql 8.4.21 in my CentOS 5. But when I fire Select Query is it not showing me any completion if I press TAB key..

database=# select count

is it any configuration in postgreql.conf ?

user95711
  • 211
  • 3
  • 4
  • 11
  • Did you install PostgreSQL via `yum` or compile it from source? Auto-complete requires `readline` library to be installed. – Janne Pikkarainen Oct 20 '14 at 07:24
  • May be there was a problem in my installation. I have downloaded new source and installed from it. It works fine. thank you for your comment. – user95711 Oct 20 '14 at 08:05

1 Answers1

0

Autocomplete on column names doesn't work in the SELECT clause, because PostgreSQL doesn't yet know what table you might be talking about.

It could offer all functions, aggregates, and all columns across all tables in all schemas, but that'd be pretty slow and not very helpful.

Part of the problem is that SQL's syntax is basically backwards. It should really be:

FROM table1 INNER JOIN table2 ON (...) SELECT ...

and that way, we could also autocomplete it usefully.

Craig Ringer
  • 11,083
  • 9
  • 40
  • 61