libpq parameter parsing problem - Mailing list pgsql-bugs

From Jobin Augustine
Subject libpq parameter parsing problem
Date
Msg-id CANaTPsrYgSgE2fuj3=4x=Jmx1c+NgkEDzftNknZbrMuqL+aBhQ@mail.gmail.com
Whole thread Raw
Responses Re: libpq parameter parsing problem  (Heikki Linnakangas <hlinnaka@iki.fi>)
Re: libpq parameter parsing problem  (Oleksandr Shulgin <oleksandr.shulgin@zalando.de>)
List pgsql-bugs
Hello hackers,
User can pass session-level settings as a parameter in the connection string like:
psql "host=localhost user=postgres options='-c synchronous_commit=off'"
Which sets the synchronous_commit off for the session.

However, URI spec is not allowing it,
psql postgresql://postgres@localhost:5432/postgres?options="-c synchronous_commit=off"
psql: error: could not connect to server: extra key/value separator "=" in URI query parameter: "options"

psql postgresql://postgres@localhost:5432/postgres?options="-c synchronous_commit off"
psql: error: could not connect to server: FATAL:  -c synchronous_commit requires a value

Moreover session just hangs forever:
psql postgresql://postgres@localhost:5432/postgres?application_name=hello&options='-c synchronous_commit=off'
provided that the connection works without the 'options' parameter specification

Thanks and regards,
Jobin.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: About postgresql pg_advisory_xact_lock use!!!!
Next
From: Heikki Linnakangas
Date:
Subject: Re: libpq parameter parsing problem