Skip to content

Feature Request: show service name in prompt #1624

Description

@jay-knight

I primarily use pgcli service=svc_name to start pgcli with everything defined in ~/.pg_service.conf. I would like the ability for that service name to appear in the prompt. I currently use \h to show the hostname, but but our hosts are things like psql-dept-tier-azflexdb-application, and I'd much prefer to just see my svc_name in the prompt.

It looks like prompt_dsn is only provided to the PGCli class for the purpose of displaying in the prompt. If we're connecting to a service name, that value could be provided instead, perhaps?

I could just redefine the services as alias_dsn, but we use other tools that use the standard pg_service file, so I really don't want to define them twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions