pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #10692: psql: \c service=foo only uses dbname information
2+ messages / 2 participants
[nested] [flat]
* BUG #10692: psql: \c service=foo only uses dbname information
@ 2014-06-18 16:03 p@article.se
2014-06-19 13:01 ` Re: BUG #10692: psql: \c service=foo only uses dbname information Pontus Lundkvist <p@article.se>
0 siblings, 1 reply; 2+ messages in thread
From: p@article.se @ 2014-06-18 16:03 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 10692
Logged by: Pontus Lundkvist
Email address: p@article.se
PostgreSQL version: 9.4beta1
Operating system: Debian sid
Description:
Trying to connect to another database via \c and a service-definition,
it seems to ignore everything other than the dbname. This includes not
using either user or host.
For a service-definition without dbname, it seems to act just like an
empty \c, reconnecting to the same connection.
Expected result: Either oblivious to service=-dsn and failing hard,
or that the full service-definition is parsed and used.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #10692: psql: \c service=foo only uses dbname information
2014-06-18 16:03 BUG #10692: psql: \c service=foo only uses dbname information p@article.se
@ 2014-06-19 13:01 ` Pontus Lundkvist <p@article.se>
0 siblings, 0 replies; 2+ messages in thread
From: Pontus Lundkvist @ 2014-06-19 13:01 UTC (permalink / raw)
To: pgsql-bugs
I've tried to track down the behavior a bit.
The reason service=foo works as a dbname, seems to be the PQconnectdbParams(,,
true)-call in psql/command.c, which is expand_dbname. This makes
conninfo_array_parse in the end try and recognize dbname as a connection string.
Didn't dig any further down that line; but I assume that's the service=foo
expansion magic is happening.
But, since user/host/port wasn't specified in \connect, they are copied from
the current connection. And I assume that overwrites whatever was parsed
from the service-definition.
On Thu, Jun 19, 2014 at 11:20 AM, hubert depesz lubaczewski
<depesz@gmail.com> wrote:
> It's not a bug. At most - missing feature. There is no mention that you
> could use "service=" or anything like this in \c parameters. And - \? shows
> clearly that syntax for \connect options is very different.
>
> depesz
>
>
> On Wed, Jun 18, 2014 at 6:03 PM, <p@article.se> wrote:
>>
>> The following bug has been logged on the website:
>>
>> Bug reference: 10692
>> Logged by: Pontus Lundkvist
>> Email address: p@article.se
>> PostgreSQL version: 9.4beta1
>> Operating system: Debian sid
>> Description:
>>
>> Trying to connect to another database via \c and a service-definition,
>> it seems to ignore everything other than the dbname. This includes not
>> using either user or host.
>>
>> For a service-definition without dbname, it seems to act just like an
>> empty \c, reconnecting to the same connection.
>>
>> Expected result: Either oblivious to service=-dsn and failing hard,
>> or that the full service-definition is parsed and used.
>>
>>
>>
>> --
>> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-bugs
>
>
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2014-06-19 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 16:03 BUG #10692: psql: \c service=foo only uses dbname information p@article.se
2014-06-19 13:01 ` Pontus Lundkvist <p@article.se>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox