Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIhb8-00FywZ-CE for pgadmin-support@arkaria.postgresql.org; Wed, 04 Dec 2024 05:06:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tIhb5-00Ey3s-TI for pgadmin-support@arkaria.postgresql.org; Wed, 04 Dec 2024 05:06:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIhb5-00Ey3j-Ip for pgadmin-support@lists.postgresql.org; Wed, 04 Dec 2024 05:06:48 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tIhb1-000xBx-T6 for pgadmin-support@postgresql.org; Wed, 04 Dec 2024 05:06:47 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-29e806faa88so967676fac.3 for ; Tue, 03 Dec 2024 21:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1733288802; x=1733893602; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fYjUwASDzJ3TTQ55MkGxrP4Su9GMXfxG5GamFwAJ0CE=; b=YgORmzdEJpS1og0Z36MLp4wvpsZ+LQEoIkkMM1fIbsnTnUTsNpa9ar6d49XG156Evu K26UDAdCdzgJRb8dWHKPUNdMd0uKyV+g44liZfvZKVs+jBNWc05aDKtYhoizpSQzDwNF nU+dGe6Z3FQPXmnPU1jwaYxT12oSdtlcx4WCNwGs3lddR5yDpB82nPhM9ZOx/I+I/sPf 3VzXjrA3FKzBWxDrwO9quD3me6pSBSu3muk4vsxM9rHc8Ng46vkLpB/AMZORGtpelW3/ XsarcvW98JLTAuQSSgzXaUTjLRqzYtbJL9DA3oLRTCOtckcAOj/DS685kUC/B4YafaYY amWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733288802; x=1733893602; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fYjUwASDzJ3TTQ55MkGxrP4Su9GMXfxG5GamFwAJ0CE=; b=XNi/JFjP+TyXARzeI0uh1Rv1bIezFPuHOA5ZRedJhU6Nl4Cbg1pXofTCNKiayTgIw0 RVec8wqThkWYLBb2lG0KtoSbK3wpmWyMtUBnIdnu2BRdv4ji8kVMuDzCuRWkDdOG7kFA UJ4HtOKbFshKRX840z7oPKU5GWz8IU0vnsCMRhgqcy/IuuGwTAQJ4ARFMLhe5sSeijbu oaEFKTrQMzFLtNJ+o48zzPVOqP3EpCh6bxbs8dboYMGzmPcwoDIr2FM5A32YTiFHRuC4 QDEXRTQJ6Sk9Q1jyZGljtwKeVjOBmTWBGWj3dhmBjhFl7uDilq3P6bzbR+eyb8GakC9z bOYQ== X-Gm-Message-State: AOJu0YzyOu5JNvHcCrw8Q4vnw5s8Lbu8Rb0CxgN3WQjTZsTcxdwX7kzz OMqzlHJnld+sknjkuphjzCE+ykDZoxyPCC8YDEX/V9sYKmP00qKjXSgLCHRjBhLJqm21ya6VpQ4 g3sF7Tfk5cDySFZBoYGFQheAuwnldTlGjGMeR X-Gm-Gg: ASbGnctkSK2fBRaGCnQ8jGpW7qsgFD76J5rCbzZIHSEOY0gcUctaQzvy+joXv8IvDeB I/E9jjJC0uTBiDPPDCzCh1DA4ltpF2w0eWXc/fkFIE4QJF43SPzuIYBrDP4tCYqHbiQ== X-Google-Smtp-Source: AGHT+IG/jvnCbL2th+BmkL8ZHQLdrpI52xmb3XIEkBYIRTIu7Hyh+WNDxKq6eue6miFpPhkwkd/YY2itmZy+KH9n4y8= X-Received: by 2002:a05:6871:e70a:b0:29e:53cc:a6c1 with SMTP id 586e51a60fabf-29e9b08bf6dmr2069045fac.6.1733288801471; Tue, 03 Dec 2024 21:06:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Wed, 4 Dec 2024 10:36:05 +0530 Message-ID: Subject: Re: Forcing autocomplete on keypress To: Zac Warham Cc: pgAdmin Support Content-Type: multipart/alternative; boundary="0000000000004e361406286abf9d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004e361406286abf9d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Zac, You can raise a feature request here https://github.com/pgadmin-org/pgadmin4/issues/new if you have any improvement suggestions. On Wed, Dec 4, 2024 at 10:13=E2=80=AFAM Zac Warham = wrote: > Thank you for the advice Aditya. I managed to get it working by adding an > extra line in my docker entrypoint although it does slow the process down= a > little when launching the container > > python3 /usr/local/lib/python3.10/dist-packages/pgadmin4/setup.py > load-servers > "/usr/local/lib/python3.10/dist-packages/pgadmin4/servers.json" > python3 /usr/local/lib/python3.10/dist-packages/pgadmin4/setup.py > set-prefs pgadmin4@pgadmin.org > sqleditor:auto_completion:autocomplete_on_key_press=3Dtrue > > My concerns with overriding the preference file path was that I then have > to manage the ownership permissions of the file that is created which is > tedious as we run various different users in production. > > Thank you for pointing me in the right direction though! > ------------------------------ > *From:* Aditya Toshniwal > *Sent:* Tuesday, 3 December 2024 7:53 PM > *To:* Zac Warham > *Cc:* pgadmin-support@lists.postgresql.org < > pgadmin-support@lists.postgresql.org> > *Subject:* Re: Forcing autocomplete on keypress > > Hi Zac, > > You can use PGADMIN_PREFERENCES_JSON_FILE in > https://www.pgadmin.org/docs/pgadmin4/8.13/container_deployment.html > > On Wed, Dec 4, 2024 at 12:45=E2=80=AFAM Zac Warham wrote: > > We have a docker setup for pgadmin and we want to force autocomplete on > keypress at launch (not through the preferences) using an environment > variable or config of some sort. I tried modifying the file at > https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/tools/sql= editor/utils/query_tool_preferences.py#L792 and > replacing False with True and this works but then breaks postgres in othe= r > ways. Is there a proper way of doing this beyond modifying this file? > > > > -- > Thanks, > Aditya Toshniwal > pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com* > > "Don't Complain about Heat, Plant a TREE" > --=20 Thanks, Aditya Toshniwal pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com* "Don't Complain about Heat, Plant a TREE" --0000000000004e361406286abf9d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Zac,

You can raise a feature request here=C2=A0https://github.= com/pgadmin-org/pgadmin4/issues/new if you have any improvement suggest= ions.

On Wed, Dec 4, 2024 at 10:13=E2=80=AFAM Zac Warham <cazwarham@hotmail.com> wrote:
<= /div>
Thank you for the advice Aditya. I managed to get it working by adding an e= xtra line in my docker entrypoint although it does slow the process down a = little when launching the container

python3 /usr/local/lib/python3.10/dist-packages/pgadmin4/setup.py load-serv= ers "/usr/local/lib/python3.10/dist-packages/pgadmin4/servers.json&quo= t;
python3 /usr/local/lib/python3.10/dist-packages/pgadmin4/setup.py set-prefs= pgadmin4@pgadmin= .org sqleditor:auto_completion:autocomplete_on_key_press=3Dtrue

My concerns with overriding the preference file path was that I then have t= o manage the ownership permissions of the file that is created which is ted= ious as we run various different users in production.

Thank you for pointing me in the right direction though!

From: = Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Sent: Tuesday, 3 December 2024 7:53 PM
To: Zac Warham <cazwarham@hotmail.com>
Cc: pgadmin-support@lists.postgresql.org <pgadmin-support@lis= ts.postgresql.org>
Subject: Re: Forcing autocomplete on keypress
=C2=A0
Hi=C2=A0Zac,

You can use=C2=A0PGADMIN_PRE= FERENCES_JSON_FILE in=C2=A0https://www.pgadmin.org/docs/pgadmin4/8.13/container_deployment= .html

On Wed, Dec 4, 2024 at 12:45=E2=80=AFAM Zac Warham <cazwarham@hotmail.c= om> wrote:
We have a docker setup for pgadmin and we wa= nt to force autocomplete on keypress at launch (not through the preferences= ) using an environment variable or config of some sort. I tried modifying the file at https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/tools/sqled= itor/utils/query_tool_preferences.py#L792=C2=A0and replacing False with= True and this works but then breaks postgres in other ways. Is there a pro= per way of doing this beyond modifying this file?



--
Thanks,<= /font>
Aditya Toshniwal
pgAdm= in Hacker=C2=A0| Sr. St= aff SDE II=C2=A0| enterprisedb.com
&q= uot;Don't Complain about Heat, Plant a TREE"


--
Thanks,
Aditya T= oshniwal
pgAdmin Hacker=C2=A0| Sr. Staff SDE II=C2=A0| enterprisedb.com=
"Don't Complain about Heat, Plant a TREE"
--0000000000004e361406286abf9d--