* to build deb & rpm simply run
```
version=<se.mv.er> vagrant provision
```
vagrant shell provisioner will run the inline script and generate
a deb and an rpm file in the local directory. This is achieved by
multivm Vagrantfile one for centos and one for debian
* To install the generated deb - run sudo dpkg -i
* /pgcli/pgcli_<se.mv.er>.deb (then sudo apt-get install -f if deps
are missing on a clean debian install)
* To install generated rpm - sudo yum install path-to-rpm
* package will be installed under /usr/share/pgcli
* script pgcli will be a symlink in /usr/local/bin/pgcli ->
/usr/share/pgcli/bin/pgcli (with right shebang line
#!/usr/share/pgcli/bin/python)
generalize tables() to _relations(relkind_filter), and add convenience methods tables() and views() which simply call _relations() with the appropriate relkind_filter value
similarly, generatize columns() to _columns(relkind_filter), and add convenience methods table_columns() and view_columns()
tabulate.py: rewrite function `len`, if the argument is the instance
of _text_type, encode to gbk and then compute its length.
the length of gbk bytecode is exactly the length of the
visible length.
Previously, if the current word contained a period, `suggest_type` would parse text to the right of the period as `word_before_cursor`, so that characters to the left of the period were parsed as the final token. Then `suggest_based_on_last_token` would generate suggestions under the generic catch-all `elif token_v.endswith('.')`. This means that, for example, `DROP TABLE schema_name.<TAB>` and `DROP FUNCTION schema_name.<TAB>` would each suggest both tables and functions from schema_name.
This commit changes this behavior to include schema qualifications as part of word_before_cursor, so that `suggest_based_on_last_token` operates on the actual preceding token, not just the schema name. This allows each token value to handle schema qualifications differently, and now `DROP TABLE schema_name.<TAB>` suggests only tables from schema_name, and the corresponding `DROP FUNCTION` command only functions.