Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    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!
    Running Seahorse brought no solution. I use no DM, just startx/i3wm
    solved the issue. pgcli config. not sure why keyring is default. well.. pgcli rocks!
    Martin Seidl
    pgcli posgresql://spk:sk@db.foo.de:5432/dbwhatev
    I've been using pgcli for years(?)
    and I recently did a fresh install of my system and re-installed pgcli, but now when I use the same connection string that was in my history sijnce forever, i get a psycopg2.ProgrammingError: invalid dsn: missing "=" after
    and the connection string
    it works with passing them separately like -p -w -u and so on
    Martin Seidl
    but for some reason with that, while it does connect, I have to re-enter the password
    Alexander Artemenko

    Guys, does pgcli have an option to not rollback current transaction?

    In psql this can be done by setting this option:

    \set ON_ERROR_ROLLBACK interactive
    Christopher Harrington

    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!

    Echoing this; that group is either invite-only or dead


    Hi everyone !
    I have a little problem with pgcli, currently when I log with psql on PostgreSQL, he ask my password, logic, but when I do the same thing with pgcli, he logs me directly without any password, but, it's a problem because it's the same with "postgres" role.

    So anyone who go on my pc if i'm away can do some shit >.<

    Thank you in advance for your help !

    'NoneType' object has no attribute 'encoding'
    can not login
    Daniel Beecham
    I'm encountering this error: keyring.errors.KeyringLocked: Failed to unlock the collection!, has anyone seen this before?
    Daniel Beecham
    For some reason, I entered keyring = False in .config/pgcli/config (in the [main] section), started - it works, and when I remove the line again, it still works. Don't know what was wrong. Can't find anything resonable wrong from a strace. Oh well.
    Risto Novik
    Hello, how can I set the application name for pgcli?
    I hope there some people active here, the last message is from Jan 16
    Anyone know how to turn multiline on
    Never mind it's f3
    Adrian Adamski
    does pgcli has persistent history? if yes is there a file in which it is stored?
    Hi, How can I fix the below message please?
    postgres> Exception in thread completion_refresh:
    Traceback (most recent call last):
    File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    File "/usr/lib/python3.8/threading.py", line 870, in runs-mode Refreshing completions...
    self._target(self._args, *self._kwargs)
    File "/usr/share/pgcli/pgcli/completion_refresher.py", line 65, in _bg_refresh
    refresher(completer, executor)
    File "/usr/share/pgcli/pgcli/completion_refresher.py", line 110, in refresh_tables
    File "/usr/share/pgcli/pgcli/pgcompleter.py", line 278, in extend_foreignkeys
    childcolmeta = meta[childschema][childtable][childcol]
    KeyError: 'my_partitioned_table'

    pgcli -v
    Version: 2.2.0

    cat /etc/os-release
    VERSION="20.04 LTS (Focal Fossa)"

    PostgreSQL 11.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit
    python3 --version
    Python 3.8.2
    Telmo "Trooper"

    Hello, guys! I cloned the source to try and disable line wrapping when displaying query results, but I realized I could just edit variable pager in .config/pgcli/configto less -S.

    Is it common for people to change their pager? Because I feel most people will never even realize there is such an option... My initial thought was to implement a toggle option in the menu like [F5] Disable line wrapping, which would change the pager to less -S or revert it back to whichever one was previously set. I'd like to hear your opinions.

    1 reply
    I work with tables with many columns and usually my first query is SELECT * since at first I'm not sure which fields will be important, the default behavior of wrapping the lines makes it very confusing to read the output.
    Nand Kishore
    time out error
    amazon web server
    Jim Angelo Beren
    Is there anyone using pgcli in arch linux? its not working for me. but the psql is working
    Rodrigo O.
    Hi, all !
    Is it possible to add some snippets/shortcuts commands like in this article customizing pgclirc ?
    1 reply
    But first of all, I would like to thank to all colaborators of pgcli ! Really nice !
    Dominic Bou-Samra
    Hi all. Love pgcli. I'm wondering if there is any provisions for allowing changing the background color of the terminal (or font) when connected to a particular database. My use case is I want to 100% know if I am on production
    Renato Flores
    Hi all. I really love pgcli, I already loved vanilla psql so I didn't know it could get any better! I'm just wondering if anyone has suggestions for how to quickly see/edit PG stored procedures?
    Rob Ludwick
    Anyway to bypass the pgcli keyring?
    I don't want to install the kde keyring stuff.
    keyring.errors.KeyringLocked: Failed to unlock the keyring!
    Augustin Trancart
    Hi! In case of error in a script, is there any way to make \i display the line number of error, like in psql?
    For instance, psql would log:
    # \i part2.sql
    psql:part2.sql:70: ERROR:  bigint out of range
    Temps : 1,536 ms
    and pgcli:
    > \i part2.sql
    bigint out of range
    Time: 0.125s
    Rohan Orton
    Hey, just started using this. It's really nice :) One question, I've been looking in the documentation and can't see anything about this, but if I'm in vi mode and i hit the v key it opens nano editor... I don't know how to set this to something sensible like vim :P I have both VISUAL and EDITOR set to vim, and the \e command opens vim.
    Adheeb Ghazali

    If you work as a sql developer, and you really learned this tool and all the shortcuts, could this remove the need for an rdbms client like dbeaver/pgadmin?

    I really appreciate this tool for making it 10x better to write SQL on the command line but the REPL style is not as intuitive to me as the Editor+Answer Pane for iterating on sql queries or building large scripts.

    I find scrolling through history cumbersome even with Ctrl+r and \e
    I am wondering if this is a learning curve? Are there people successfully using this as their main client for heavy lifting with SQL.- Or is that not the purpose of this project?

    Rohan Orton
    @_adheeb_twitter I am new to this particular app, so can't really answer your question well. Personally I like having a commandline app (up until recently psql) that I can use for doing quick queries without leaving the terminal, which is where I do most of my work. I use a GUI (usually Postico or PGAdmin) for more substantial work. I find it nice to not have to jump back and forth between the CLI and the GUI as I find this breaks my workflow a bit
    Question re: named queries. Is there a way of composing named queries? e.g. \ns get_friend_ids select id from (\n get_friends '$1')
    Hi, I'm working on my development skills and thought I'd try to help out some. I'm working through the development setup document. I'm new to vagrant but as far as I can tell the current vagrant file won't work because I can't find chef/centos or chef/debian in the vagrant list. Am I misunderstanding something?