Re: psql - better support pipe line

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql - better support pipe line
Date: 2015-08-26 15:44:26
Message-ID: CAFj8pRAcj7ofeto1WLFrVgqumZ7XHTc-L0tqRj24vi1528zZ2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2015-08-25 17:21 GMT+02:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> writes:
> > What I've had problems with is trying to correlate psql specified
> > connection attributes with things like DBI. It would be nice if there
> > was a way to get a fully formed connection URI for the current
> connection.
>
> Yeah, although I'd think the capability to create such a URI is libpq's
> province not psql's. Maybe a PQgetConnectionURI(PGConn) function in
> libpq, and some psql backslash command to access that? Or maybe a nicer
> API would be that there's a magic psql variable containing the URI; not
> sure.
>

proof concept of PQGetConnectionUri and \uri command.

missing:

connection options
uri encoding

>
> regards, tom lane
>

Attachment Content-Type Size
PQgetConnectionUri.patch text/x-patch 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-26 15:50:59 Re: WIP: Rework access method interface
Previous Message Stephen Frost 2015-08-26 14:35:25 Re: exposing pg_controldata and pg_config as functions