public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Manav Kumar <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Unable to set guc via setProperty
Date: Fri, 20 Jun 2025 07:22:51 -0700
Message-ID: <CAKFQuwaLd4tOYxE-Hw8CCWw2KZN_GooAmg6uHcOFF+et6hDNxw@mail.gmail.com> (raw)
In-Reply-To: <CAPhCW+9yjyFbf21-LmGWkFZPNCF0hYPVy5ukTRxYXgOL+CHX7A@mail.gmail.com>
References: <CAPhCW+9yjyFbf21-LmGWkFZPNCF0hYPVy5ukTRxYXgOL+CHX7A@mail.gmail.com>

On Friday, June 20, 2025, Manav Kumar <[email protected]> wrote:

> Hi Team,
> I've a doubt regarding passing guc variables in start up packet as key
> value pairs instead of in options.
>
> I'm unable to set jdbc:postgresql://10.150.3.175:6433/postgres?&geqo=off
> m geqo to 'off'. I don't want to use "options" rather pass directly key
> value pairs similar to what JDBC driver internally does.
>

> Neither setProperty("geqo", "off") works in this case.
> Can someone let me know why I can't do it?
>

Probably because that isn’t how things work…connection properties are set
using set property and gucs aren’t connection properties - though there is
a pass-through connection property called options that can hold a list of
gucs to set.


>
> I learnt or from code, it's seen the key value pairs has higher precedence
> or override the guc values passed via cmdline option("options") field when
> both passed in start up packet.
> That's why with JDBC, even i try to set "options - DateStyle to
> 'Postgres,DM'Y'" we are unable to change value as DateStyle is also passed
> as key value by driver with 'ISO' which has higher precedence.
>
>
IIUC the driver must control date style to operate correctly.  And as a
user you shouldn’t care because you’ll be using Java classes to process
dates.

David J.


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Unable to set guc via setProperty
  In-Reply-To: <CAKFQuwaLd4tOYxE-Hw8CCWw2KZN_GooAmg6uHcOFF+et6hDNxw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox