Re: psql - better support pipe line

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-28 01:29:39
Message-ID: 55DFB983.2070007@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/27/15 8:37 AM, Pavel Stehule wrote:
>
> I don't think we can detect and remove the default values from this
> output in a reliable way?
>
>
> This is pretty difficult - any parameter can be important, and hard to
> identify default values on client side without connect to server side. I
> don't see any other way, than hold bitmap for identification entered
> values and default values from the input.

That would be nice, but probably not that big a deal.

What I think would be more useful is a way to exclude the password if
you didn't need it.

It occurs to me the most flexible thing that could be done here would be
providing a libpq function that spits out JSON connection parameters and
have psql turn that into a variable. It would be easy to feed that to a
SQL statement and do whatever you want with it at that point, including
format it to a connection URI.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-08-28 01:42:36 Re: Support for N synchronous standby servers - take 2
Previous Message Jim Nasby 2015-08-28 01:16:05 pg_extension_config_dump() doesn't register owned sequences