Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9jn4-0004zV-CX for pgadmin-hackers@arkaria.postgresql.org; Thu, 15 Jun 2023 10:01:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9jn3-0008Mg-9E for pgadmin-hackers@arkaria.postgresql.org; Thu, 15 Jun 2023 10:01:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9jn2-0008LL-U5 for pgadmin-hackers@lists.postgresql.org; Thu, 15 Jun 2023 10:01:17 +0000 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q9jmx-002KBz-Q6 for pgadmin-hackers@postgresql.org; Thu, 15 Jun 2023 10:01:14 +0000 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5701e8f2b79so12040627b3.0 for ; Thu, 15 Jun 2023 03:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1686823271; x=1689415271; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VAwOAfMjExyyVNu8ygRnrVp7Tjn0ZAUyp4Uo6WQnXog=; b=QuuRjN9lInUiqld2MUP5EqoDL6sCEDihPJZN5i1Wh+HHJIkA4MXlG5bqIl3aPagm/t heltjxPBzyJaCQAPwtlGNP5ISZc1x/bsCu67b9tNHeyWJFwoNX2kgdxOlgvlSUbYaIXc +dfW34oE8ChACFBqxYjgJuEvcpgsNdNVkO4VNBAOcNW16SEe9uEeBJEz7+SP4GhqlmLS CpT8zHAqdPKD+BbECg3HpHQ592hk7ye2B+53hdfz8fuoPbh2Lt16rII+OGXVKnZdpseV 0r2yZ2Gv4AiwTiGbd28dCDgd4f/U3J9ULd+qm9wia3OTb3O0cnCIFdlvlsBU7nO1yaXb GMJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686823271; x=1689415271; 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=VAwOAfMjExyyVNu8ygRnrVp7Tjn0ZAUyp4Uo6WQnXog=; b=YSqMae3x+YlJN2HlsFmaHc8d6sGFXob1PcF4Z5VtNOPLzYD63wPXBYJI2mlFGoap5h WUDMavOGLk4VENWBs/E6644PdbE0BcP2OJwNXDWT605cAuZuc9s+LeI61tZ9KRPrT15v G/O0lVN2iGDU3o5bBKZhsQ5y83RF6SrZWOh2ei2Gud5XvxKDJGtEtD21O6fxeH8kAqCu ZqcYJkrHaNxECQy9IYqUqt5rCwdXJzozWMwa3JkvAnE9T7nsPJEuYnoGOv40+q54pkm4 I4hdN760qC7icjHbIBqnN6RIJj/54pk0GWHAqgYtno4MJjiEwVG/P9EZob50tc3caBaw kDvg== X-Gm-Message-State: AC+VfDxSh4PLFhvM9nAgkO+PdyJGNMj1WzR4t7CTlHMeHaGgFlYI3dGW aRhpVyId/tMG9Zhyk0f2nHqD9Z1JHYW3JL558mtuow== X-Google-Smtp-Source: ACHHUZ4tTf9ZqvQXttsqxn295lFF8Sb3sabItRcs0iKyqrMtxDvChMQlLt3Vrfrrq7rBF00LPokjxvpoKzzY9zmSnwk= X-Received: by 2002:a0d:d854:0:b0:55a:18e2:cdf9 with SMTP id a81-20020a0dd854000000b0055a18e2cdf9mr4589594ywe.49.1686823270575; Thu, 15 Jun 2023 03:01:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Khushboo Vashi Date: Thu, 15 Jun 2023 15:30:59 +0530 Message-ID: Subject: Re: Required inputs in issue #6138 To: Dave Page Cc: Nikhil Mohite , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000d788f105fe28252a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d788f105fe28252a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 15, 2023 at 3:11=E2=80=AFPM Dave Page wrote= : > > > On Wed, 14 Jun 2023 at 13:43, Nikhil Mohite < > nikhil.mohite@enterprisedb.com> wrote: > >> Hi Hacker, >> >> I am currently working on issue #6138 >> , which was fixed >> earlier but the fix was not correct so working on it again. >> Steps to reproduce the issue: >> 1. Open *View/Edit Data *for *table1* >> 2. Open the PSQL tool delete the same *table1 *and recreates the same >> name table *table1* and try to re-execute the query from the >> already opened *View/Edit data *panel. >> 3. pgAdmin throws an error in the Messages tab *List index out of range = *(pgAdmin >> query to get table columns from Postgres based on *table oid* which was >> deleted and the return result is empty which is not handled in pgAdmin) >> *.* >> >> Approach to fix this issue: >> 1. If the user re-executes the query from already opened *View/Edit data= * we >> should fetch the table details by using *schema and table name (not >> using table oid)* and show the newly created table records in the result= . >> (This will only fix an issue with *View/Edit Data *however if the user >> switches to properties or some other panel it user will still get an err= or >> notification with content *"could not find the specified table."*) >> > > I think this is fine. The View/Edit data window shows the query with > table/schema name after all, so the user should expect it to work. > > The object for which the user has opened the View data panel is completel= y changed. So as per me, it should raise the error object doesn't exist. The table name is the same, but it is a different object, and when we initialise the panel, we consider that object. --=20 > Dave Page > Blog: https://pgsnake.blogspot.com > Twitter: @pgsnake > > EDB: https://www.enterprisedb.com > > --000000000000d788f105fe28252a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jun 15, 2023 at 3:11=E2=80=AF= PM Dave Page <dpage@pgadmin.org= > wrote:


On Wed, 14 Jun 2023 at 13:43, Nikhil Mohi= te <= nikhil.mohite@enterprisedb.com> wrote:
Hi Hacker,

I am currently working on issue #6138, which was fixed earlier= but the fix was not correct so working on it again.
Steps=C2=A0t= o reproduce=C2=A0the issue:
1. Open=C2=A0View/Edit Data fo= r table1
2. Open the PSQL tool delete the same table1 <= /i>and recreates the same name table table1 and try to re-execute=C2= =A0the query from the already=C2=A0opened=C2=A0View/Edit data panel.=
3. pgAdmin throws an error in the Messages tab List index out= of range (pgAdmin query to get table columns from Postgres based on table oid which was deleted and the return result is empty which is no= t handled in pgAdmin).

Approach=C2= =A0to fix this issue:
1. If the user re-executes=C2=A0the query f= rom already=C2=A0opened View/Edit data=C2=A0we should=C2=A0fetch the= table details=C2=A0by using schema and table name (not using table oid)= =C2=A0and show the newly created table records in the result.
(This will only fix an issue with View/Edit Data however if the use= r switches to properties or some other panel it user will still get an erro= r notification with content=C2=A0"could not find the specified tabl= e.")

I think this is f= ine. The View/Edit data window shows the query with table/schema name after= all, so the user should expect it to work.=C2=A0

The object for which the user has opened the View = data panel is completely changed. So as per me, it should raise the error= =C2=A0object doesn't exist.
The table name is the same, but i= t is a different object, and when we initialise the panel, we consider that= object.

-- <= /span>
--000000000000d788f105fe28252a--