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 1rxoMD-00C6TA-GN for pgadmin-hackers@arkaria.postgresql.org; Fri, 19 Apr 2024 13:32:49 +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 1rxoMC-002Vu0-6B for pgadmin-hackers@arkaria.postgresql.org; Fri, 19 Apr 2024 13:32:48 +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 1rxoMB-002Vts-T9 for pgadmin-hackers@lists.postgresql.org; Fri, 19 Apr 2024 13:32:47 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rxoM8-001osK-Dy for pgadmin-hackers@postgresql.org; Fri, 19 Apr 2024 13:32:46 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-5aa4a1246b1so1200016eaf.3 for ; Fri, 19 Apr 2024 06:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1713533562; x=1714138362; 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=tl+WUzOJJ5AWYaaG7WX2ARWLw0Ej18W1NMFpMzz8HVM=; b=a+m/317cihrE9j5KhUB8jEljDc1oUwRc5VLUmukkrmHHF5bpf1eYno5O28cr2y+NOH 7sO6RLMg7JO80N6YwNttxQ83wKl4BR8G3Ni3Zgfjnfi0kbylc42xGfGTA4uGH3H80Gxc NveYAj2s2GwO7n5q571Dd9FVJ7P2pW5WxtBrdemeHWkfPfHMU3VvtiUYG6QarQRpgsBR htXuXl5tZKhie4NBmKRJqffMXgxS/HvuV7G6YMnx1aaRrIfWR1EaeKD6zKCq227OsQcR RJ7Uc2KZQQ1kOGInfBHd7DSMTsYPqaqUbA2bO7oRaWBEN0cZZm+7N8E4NANbiTXpcYCc kXgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713533562; x=1714138362; 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=tl+WUzOJJ5AWYaaG7WX2ARWLw0Ej18W1NMFpMzz8HVM=; b=Wv7DJABblusVyoA+pEow9twTCDm31Xw2UIywr2atD9MO/qQwUNxsKecZA8WtYIfLH+ wKl0yEuiit2dikC3dJvPBeaYV9XEk4zfIcpY1/60QbRzCDSpA7cpB/RnUpNefWWBvHOh sAYesG9cylZw9fiMkfAml+Mm3U5X7f12ZLvSSyXgwyda6N0bd7P3cNXqbR0+W83Mfmas oImQh9lOmhg1rLGC5GgNrxU/hTbwSfzemax187rk0MeXZP9fxRq0/KAvFT+Yu5fzQk4j JZti9Usz7khinZukQec53OKVzf1knzRcAVJ9weLNTTAcggj7X09zP/TiubXsqNij9LSG EQwg== X-Forwarded-Encrypted: i=1; AJvYcCVEQt2coBd6LEo+5AGIM5h9eBJovyLE7ht7XYJ8k9H29s2PRkT5tOh8xroa5Vt/ngxwlRrbV0K40ltj04Ug2Ouuk9r95HQMdeawzbJ6Vzk= X-Gm-Message-State: AOJu0YzMsgutMyfwXXO1G8ZgykOL1vyHhuHnSCI8o1CY6nk/Gi7Actnb ryhwv4E5y61TjMfrRnwJMZPLpkJEqrh6K9zVs8ilqJJd554D4v4KHa1FeSPAnHqqpZjpvak8tRO /CcuX5l2gNUyu730Lx8nNQOeBtWq7brrgIfGs X-Google-Smtp-Source: AGHT+IH0ZrqTKsS+dTa43nElN9b8RRGtZV+V/b0soZD8ELFJB42CYXV+3x2HadI3cWCImAx3R8DiwK2969vwFg3COwY= X-Received: by 2002:a4a:1447:0:b0:5ac:9f86:cc0d with SMTP id 68-20020a4a1447000000b005ac9f86cc0dmr2273205ood.6.1713533561846; Fri, 19 Apr 2024 06:32:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Fri, 19 Apr 2024 19:02:06 +0530 Message-ID: Subject: Re: Regarding feature #6841 To: Dave Page Cc: Anil Sahoo , pgadmin-hackers@postgresql.org Content-Type: multipart/alternative; boundary="00000000000043dc7a0616731fea" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000043dc7a0616731fea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dave, On Fri, Apr 19, 2024 at 6:22=E2=80=AFPM Dave Page wrote= : > Hi > > On Fri, 19 Apr 2024 at 11:56, Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> >>> Even if you put the cursor on the "SELECT"? If so, that would imply the >>> parser understands the string quoting; e.g. in this case, the Python >>> multiline string. Presumably then it would also understand regular sing= le >>> and double quotes - what about (for example) a heredoc in a pl/sh funct= ion? >>> >> Yes, the parser understands all the aspects of a SQL query and so it >> understands what type of token the cursor is based on which it does the >> syntax highlighting I believe. >> > > Does it? Even EPAS extensions? > I mean only standard SQL grammar. > > > >> >>> It sounds like Thom has similar concerns, and I know him well enough to >>> know he wouldn't chime in without good reason. >>> >> There are limitations and it won't work correctly apart from standard SQ= L >> queries. Like I said, we're adding it as a new button without touching t= he >> existing working. If a user chooses to use the new button, he knows that >> pgAdmin will try to find the query on its own. This is an optional featu= re. >> Additionally, what we could do is when the user hits the button we will >> show a warning and the user can opt for not showing it again. >> > > Ten minutes later they will have forgotten that warning. > > I'm currently thinking that we should display the current query all the > time somehow (though I'm not sure how, without taking up a lot of space). > Can't we add some kind of tooltip or popover on hover over the execute query button? > > BTW, if we do figure out a way of doing this that we all agree is safe, > I'm going to want to see a bunch of automated tests against valid EPAS an= d > PG queries, as weird and bizarre as we can think of. > I agree. > > -- > Dave Page > pgAdmin: https://www.pgadmin.org > PostgreSQL: https://www.postgresql.org > EDB: https://www.enterprisedb.com > > --=20 Thanks, Aditya Toshniwal pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com* "Don't Complain about Heat, Plant a TREE" --00000000000043dc7a0616731fea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Dave,

On Fri, Apr 19, 2024 at 6:2= 2=E2=80=AFPM Dave Page <dpage@pgadm= in.org> wrote:
Hi

On Fri, 19 Apr 2024 at 11:56, Aditya Toshniwa= l <aditya.toshniwal@enterprisedb.com> wrote:

Even if you put the cursor on th= e "SELECT"? If so, that would imply the parser understands the st= ring quoting; e.g. in this case, the Python multiline string. Presumably th= en it would also understand regular single and double quotes - what about (= for example) a heredoc in a pl/sh function?
<= div>= Yes, the parser understands all the aspects of a SQL query and so it unders= tands what type of token the cursor is based on which it does the syntax hi= ghlighting I believe.

<= div>Does it? Even EPAS extensions?
I mean on= ly standard SQL grammar.

=C2=A0

It s= ounds like Thom has similar concerns, and I know him well enough to know he= wouldn't chime in without good reason.
<= div>= There are limitations and it won't work correctly apart from standard S= QL queries. Like I said, we're adding it as a new button without touchi= ng the existing working. If a user chooses to use the new button, he knows = that pgAdmin will try to find the query on its own. This is an optional fea= ture.
Additionally, what we could do is when the user hits the= button we will show a warning and the user can opt for=C2=A0not showing it= again.

Ten minute= s later they will have forgotten that warning.

I&#= 39;m currently thinking that we should display the current query all the ti= me somehow (though I'm not sure how, without taking up a lot of space).=
Can'= t we add some kind of tooltip or popover on hover over the execute query bu= tton?
=

BTW, if we = do figure out a way of doing this that we all agree is safe, I'm going = to want to see a bunch of automated tests against valid EPAS and PG queries= , as weird and bizarre as we can think of.
I agree.

--
Dave Page=
PostgreSQL: https://www.postgresql.org
EDB:=C2=A0<= a href=3D"https://www.enterprisedb.com" target=3D"_blank">https://www.enter= prisedb.com



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