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 1sgFkK-00HNVk-II for pgadmin-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 03:41:24 +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 1sgFkI-007mQp-L5 for pgadmin-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 03:41:23 +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 1sgFkI-007mNu-AT for pgadmin-hackers@lists.postgresql.org; Tue, 20 Aug 2024 03:41:22 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgFkE-000Xx3-6F for pgadmin-hackers@postgresql.org; Tue, 20 Aug 2024 03:41:21 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a864574429aso54114066b.0 for ; Mon, 19 Aug 2024 20:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1724125278; x=1724730078; 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=7lLp72aq9+GBZ2LxQnXJ6E/JeOpRGZTa9+Do408mJP4=; b=JxXFKIElzfLQ5yjT7XbY4EXS1ngWDsOxAWKXLupjpiV1kvGkTPesjjreDfMaJ5XLX9 itRhaVBqo5kaqNA9n1BkHtwmHAI8ekf7ogi9sHcVYOwTiJHgo8hQd1CRH45GsNlVNzes GzS7Vxk0rO0Y4eYV/T/6xXydkLl3TkiWvZkhjWLjxA3jhGcxOwDa8VbDpXgrC3SbvIDr AIACBdiNvswE+6/Ok2SjZw6EQkp2zbOoNkv9FiMei/CLjaem6Q+alWo6wciLZh9PuLHy newsqwaciSaDzPEx8pYZLuwhTGnOcYC85v4FnRFka9iOw+mUR6u1ZCKJ16cxVsN7E06k NM4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724125278; x=1724730078; 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=7lLp72aq9+GBZ2LxQnXJ6E/JeOpRGZTa9+Do408mJP4=; b=ocSfC2NfqbSdbnT7uV+VwMwAuTD/IRbDFC0Zw1PE+16dcEC6T3jq4woB2xKMypixNy HeZXGthNyxjBQzO6l6zpd+NslDFPpeeR6y7L4J3PqI3irShO5RU2ukOlDat5IUQSxfof zBx89kg66aa7quTgwR20pV2ZXfO1+dluUR1ml6cJpOB2x+ylxQYBI2DcU0BqC3PqVQnH mlTmZcWRZcHCWg4mr6t/DZ5krMTQJ47BA43qyGrXux5uH/vMftT5YkmUjg0PMfm1tu7e ruWp7nW1ro+mzTVig5gSABdbpB6A6yZ1UfBYrA+KbHBtoAUPKo546KT/Hh0r2F2BTsNr einw== X-Forwarded-Encrypted: i=1; AJvYcCXnNh/BmmaICcbuKi2WHCVjsQApbgY865F15XoQDuCpUVbRcueRbH1x4a3xZ7LOUT28FDjjHI5rrl1EoEDTo9U=@postgresql.org X-Gm-Message-State: AOJu0YyGYslg+tJrt7cvj0u/BDHljg6UvT5xf/cjYe6l6Tv7qoohK8tO uFHjJWxDu+XALVR6RZa30AolzfDyE+k6JRb20Lw3wLyi2eSliLdWHqo27vqr+nRi/7YF0bGsdTB XTs2ZnpJ+JMrIL4RfRil8qx1lPQu+arbOVkFb X-Google-Smtp-Source: AGHT+IGM4jNWxso+kmx8S5FRhemSPiW46Up6UfP8XGJCxvN1lmp3QWfhRdupVeWYVsX7DK8kr/OSn3R9RyhxRgL3Mp4= X-Received: by 2002:a17:907:e64d:b0:a7d:8982:90ea with SMTP id a640c23a62f3a-a839293f954mr879165566b.31.1724125277392; Mon, 19 Aug 2024 20:41:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Anil Sahoo Date: Tue, 20 Aug 2024 09:10:41 +0530 Message-ID: Subject: Re: Regarding feature #3319 To: Aditya Toshniwal Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000b530200620153212" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b530200620153212 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Aditya, As we are already storing the query history in the pgAdmin 4's database file. I am planning to store the information the same way. That can be an internal database file like SQLite or external database. Let me know if you all have any suggestions on this. Thanks Anil -- *Anil Sahoo* Software Engineer www.enterprisedb.com Power to Postgres On Mon, Aug 19, 2024 at 11:40=E2=80=AFAM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Anil, > > On Mon, Aug 12, 2024 at 3:02=E2=80=AFPM Anil Sahoo > wrote: > >> Hi, >> >> Yes, We will store the details that are needed to re-establish the >> connection. >> > > How/Where are you planning to store the information? Query text could be > large. > >> >> Regards >> Anil >> -- >> >> >> >> *Anil Sahoo* >> >> Software Engineer >> >> www.enterprisedb.com >> >> Power to Postgres >> >> >> >> >> >> >> >> On Mon, Aug 12, 2024 at 2:08=E2=80=AFPM Dave Page wr= ote: >> >>> Hi >>> >>> On Mon, 12 Aug 2024 at 06:50, Anil Sahoo >>> wrote: >>> >>>> Hi Hackers, >>>> >>>> >>>> This feature #3319 >>>> , demands the >>>> Workspace and the Query tool panel to be saved before exiting the >>>> application and on restart it will show earlier opened panels. >>>> >>>> >>>> We are already saving the Browser layout, Query tool layout and the >>>> Object explorer tree state but to save the contents of panels we will >>>> initially start with the Query tool. The below implementation will be = done, >>>> >>>> 1. Store the query tool panels and the list of connections present >>>> in each query tool panel and the active connection >>>> 2. Store the query that is written in the editor >>>> 3. Store the contents of scratch pad >>>> >>>> The main reason that this has never been worked on is that there is no >>> way to restore the state of a connection to what it was and be sure we'= ve >>> got it right. How do you propose to handle that? I assume in a similar = way >>> to the warnings we give if a connection has to be re-established? >>> >>>> >>>> >>>> >>>> We will use debouncing to store the workspace data and all other data >>>> related to panels in the pgAdmin 4's configured database file. Through >>>> debouncing we will be able to call the API at certain intervals of use= r >>>> interaction, and it will update the stored data related to workspace a= nd >>>> all other panels. >>>> >>> >>> OK. >>> >>> -- >>> Dave Page >>> pgAdmin: https://www.pgadmin.org >>> PostgreSQL: https://www.postgresql.org >>> EDB: https://www.enterprisedb.com >>> >>> PGDay UK 2024, 11th September, London: https://2024.pgday.uk/ >>> >>> > > -- > Thanks, > Aditya Toshniwal > pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com* > > "Don't Complain about Heat, Plant a TREE" > --000000000000b530200620153212 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Aditya,

As we are already storing th= e query history in the pgAdmin 4's database file.
I am planni= ng to store the information the same way. That can be an internal database = file like SQLite or external database.=C2=A0

L= et me know if you all have any suggestions on this.

Thanks
Anil
--

<= p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><= font color=3D"#000000" face=3D"Arial">Anil Sahoo

= Software Engineer

www.enterprisedb.com

Power to Postgres

=

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0



On= Mon, Aug 19, 2024 at 11:40=E2=80=AFAM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com= > wrote:
Hi=C2=A0Anil,

On Mon, Aug 12, 2024 at 3:02=E2= =80=AFPM Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:
Hi,

Yes, W= e will store the details that are needed to re-establish the connection.

How/Where are you planning=C2=A0to store the info= rmation? Query text could be large.

Regards
Anil
<= div>--

Anil Sahoo

<= span style=3D"font-size:13.3333px;white-space:pre-wrap">Software Engineer

www.enterprisedb.com

Power to Postgres

=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0



On Mon, Aug 12, 2024 at 2:08=E2=80=AFPM Dav= e Page <dpage@pga= dmin.org> wrote:
Hi

On Mon, 12 Aug 2024 at 06:50, Anil Sahoo &l= t;anil.sah= oo@enterprisedb.com> wrote:

Hi Hackers,


This feature=C2=A0#3319, demands the Wor= kspace and the Query tool panel to be saved before exiting the application = and on restart it will show earlier opened panels.


We are already saving the Browser layout, Query tool layout and the= Object explorer tree state but to save the contents of panels we will init= ially start with the Query tool. The below implementation will be done,

  1. Store the query tool panels and the list of connections present in= each query tool panel and the active connection
  2. Store the query that is written in the editor
  3. Store the contents of scratch pad
The main reason that this has never been worked on is that there is= no way to restore the state of a connection to what it was and be sure we&= #39;ve got it right. How do you propose to handle that? I assume in a simil= ar way to the warnings we give if a connection has to be re-established?=C2= =A0


We will use debouncing to store the workspace data and all other da= ta related to panels in the pgAdmin 4's configured database file. Throu= gh debouncing we will be able to call the API at certain intervals of user = interaction, and it will update the stored data related to workspace and al= l other panels.


OK.=C2=A0<= /div>

-- =
Dave PagepgAdmin: https://w= ww.pgadmin.org
PostgreSQL: https://www.postgresql.org

PGDay UK 2024, 11th September, Londo= n: https://2024.pgday.= uk/



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Software Architect=C2=A0| enterprisedb.com