Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    hello all, i got 2 questions about mycli usage in windows 7:
    1, how can PowerCmd work with mycli? i trid and it's a mess.
    2, has anyone come accross that whe type 'V' in the keyboard and then it acts just like the key ENTER ?
    thanks for sharing solutions.
    Matthieu Guilbert

    Hey hello, 2 question about contributing.

    1. pep8radius master --docformatter --in-place don't produce any output locally but failed on travis.
    2. When running py.test locally after behave, the following tests failed, any idea why ?
      ============================================= FAILURES ==============================================
      ___ test_pathscompletion __

    completer = <pgcli.pgcompleter.PGCompleter object at 0x104f4fba8>
    complete_event = <Mock id='4378129968'>

    def test_paths_completion(completer, complete_event):
        text = '\i '
        position = len(text)
        result = set(completer.get_completions(
            Document(text=text, cursor_position=position),
      assert result > set([Completion(text="setup.py", start_position=0)])

    E AssertionError: assert {Completion(text='test_main.py', start_position=0), Completion(text='test_plan.wiki', start_position=0), Completion(te...s/'), Completion(text='test_sqlcompletion.py', start_position=0), Completion(text='pytest.ini', start_position=0), ...} > {Completion(text='setup.py', start_position=0)}
    E + where {Completion(text='setup.py', start_position=0)} = set([Completion(text='setup.py', start_position=0)])

    complete_event = <Mock id='4378129968'>
    completer = <pgcli.pgcompleter.PGCompleter object at 0x104f4fba8>
    position = 3
    result = {Completion(text='test_main.py', start_position=0), Completion(text='test_plan.wiki', start_position=0), Completion(te...s/'), Completion(text='test_sqlcompletion.py', start_position=0), Completion(text='pytest.ini', start_position=0), ...}
    text = '\i '

    test_naive_completion.py:65: AssertionError
    ============= 1 failed, 2406 passed, 100 skipped, 1 xfailed, 1 xpassed in 15.90 seconds =============


    Fernando Lucio Canizo
    hello, I've updated my Ubuntu to 18.04 LTS and suddenly my pgcli is broken
    Tried to install again followin the long install instructions: sudo apt install libpq-dev python3-dev; sudo pip3 install pgcli
    $ pgcli postgres
    Command 'pgcli' not found, but can be installed with:
    sudo apt install pgcli
    Ok, don't know why it's not on my $PATH, but I'll try the suggestion anyway, so I issue: ```
    sudo apt install pgcli
    The following packages have unmet dependencies:
     pgcli : Depends: python3-psycopg2 (>= 2.6.2) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    Fernando Lucio Canizo
    I could find a solution about why the pip-installed one doesn't get included in my path, also haven't found a solution for the package-maintaned version
    Has anyone stomped with this?
    Also tried:
    $ python3 -m pgcli
    /usr/bin/python3: No module named pgcli.__main__; 'pgcli' is a package and cannot be directly executed
    Fernando Lucio Canizo
    There's nothing in /usr/local/bin
    Fernando Lucio Canizo
    @jvidin use \copy ...
    It works
    is it possible to save query result set to a file in TSV/CSV format?
    Matthieu Guilbert
    Hey, I created a PR few weeks ago, is anybody able to review it ? dbcli/pgcli#917
    Fernando Lucio Canizo
    Hi all, I still haven't solved my problem with pgcli not running in Ubuntu 18.04 from August (!)
    Today I decided to check on a new machine... I thought: maybe my python installation is screwed on the machines I tested because the dist-upgrade
    So I launched a new VM an noticed pgcli is not even listed on 18.04
    Fernando Lucio Canizo
    Forget what I just wrote: I was missing an update on the new machine, everything works perfect. So my problem on the dist-upgraded machine could be fixed by deploying a new one
    Frank Sheiness
    where does one set a default search_path ?
    Thank you for pgcli
    Nice extention

    @fernandocanizo try 1)pip install --upgrade requests

    2)pip install psycopg2-binary

    3) pip install pgcli --no-binary :all: psycopg2


    Hi Team,

    I am new to pgcli project, just setup my DEV environment on Linux Mint 19 Tara today, when I run py.test, I'm getting same error mentioned by @gma2th


    hi all, just wanna share my setup :

    • set multiline
    • set vi as keybindings
    • use pspg as default pager

    [entering heaven]

    Unmesh K
    Hi - I am new to pgcli. I'm getting errors when trying to install it. Does pgcli work with Python 3 on Windows?
    Error I see on >pip install pgcli:Failed building wheel for setproctitle
    Running setup.py clean for setproctitle
    Failed to build setproctitle
    jupyter-console 5.2.0 has requirement prompt-toolkit<2.0.0,>=1.0.0, but you'll have prompt-toolkit 2.0.7 which is incompatible.
    ipython 6.5.0 has requirement prompt-toolkit<2.0.0,>=1.0.15, but you'll have prompt-toolkit 2.0.7 which is incompatible.
    Adi Nemer
    quick question
    do i have to install postgre to use the cli or can i use it to access remote postgre servers
    Matheus Rosa
    Hello @adinemer
    You don’t need to have PostgreSQL database installed. You can access remote databases. Here is our documentation page:
    Hey guys. I got module 'keyring.errors' has no attribute 'KeyringLocked when running pgcli -D xxx. Any advice?
    hi i have 1 question, can i do some query or something to get CREATE STATMENT for that table, i think i saw it can be done with pg_dump but am asking can i do it while in pgcli
    Hey all. What's the keyboard shortcut to accept the line suggestion with autocomplete?
    Hey there
    question: How can I make pip3 install pgcli use psycopg2-binary instead of building it from source?
    Adam Hopkins
    Anyone seen PQconninfo not available in libpq < 9.3 after installing and trying to sign in?
    I am trying on an installation of Postgres 9.4
    I have been able to login fine from a different machine
    Roger Pack
    As a note the link to the google group https://groups.google.com/forum/#!forum/pgcli says "This group either doesn't exist, or you don't have permission to access it. If you're sure this group exists, contact the Owner of the group and ask them to give you access." cheers!
    Ben Williamson
    Is there a way to download pgcli as a dependency to a project and use the cli to run sql scripts on it?
    Amjith Ramanujam
    @ben-williamson-1999 That seems possible. What project are you thinking about embedding pgcli into?
    Ben Williamson
    @amjith I have an existing application which talks to an oracle database using SQLcl (among other things) and was exploring other products which could talk to the new postgresql database. The current solution executes the sqlcl.jar in the code and this needs to be substituted with pgcli. Was wondering if this was possible with the way pgcli is created.
    I'm a bit confused, the gallery shows every theme in dark/light mode but I can't find where to switch light/dark modes
    https://pastebin.com/KMhdnVu3 trying to fix this issue on Arch. No success so far. Would It be possible to fix that permanently?
    keyring.errors.KeyringLocked: Failed to unlock the collection!