Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amyW4-0000Rk-Vm for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Apr 2016 07:01:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1amyW4-0003Ua-G7 for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Apr 2016 07:01:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1amyW3-0003SQ-JM for pgadmin-hackers@postgresql.org; Mon, 04 Apr 2016 07:01:39 +0000 Received: from mail-ig0-x235.google.com ([2607:f8b0:4001:c05::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1amyVw-0005Ci-2c for pgadmin-hackers@postgresql.org; Mon, 04 Apr 2016 07:01:38 +0000 Received: by mail-ig0-x235.google.com with SMTP id ui10so66207311igc.1 for ; Mon, 04 Apr 2016 00:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zdqdK0BM5N4kgH6wzTu98B4AZSKrap+bMNt8n4O8soY=; b=SV29TeQ9Nfqd6+tLXtsyizwv6NLB0Q0aNzzrfX7purlsApCyoS8liFBEcPMGCQGZmM bdNFIbhvQrJXtxUSQ6WF2jQZS8cL/ysmtB4Lz5uQBTHbK+u9+N7Ask51yoQU2FVUnbKM mGKEQbc/+paKLyBfVAmz+ipVXxq4hSTT7zFCtkeWzHuizIyd9REAWQW5gi446s/KtdEN J5qG2CBtLHXAblWfJs7pjOeBlW3MlB1w8vvjBgJQq6TXEMJCAdbs4AH75xqjqPPM4uPq gI5rsA2rKbEMGyw9mXaxJqfw/6PrEsr7slUz4ocfr7HeHA9PDBwOMntXeEuAMasY5taE vg1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zdqdK0BM5N4kgH6wzTu98B4AZSKrap+bMNt8n4O8soY=; b=SDEMwQaZW9VdTyxnHwAXFQWDOhZGOkWX0QsjQGntHsLLhJXIY5L1y/xGrD/oz2vujm CgP1H2b4YIWc2pBgj72QUyO5gv3eclpTRUs8nt7XkYSU1MfhOPqPY8nOmMXEiX3lqy// Tp4qIq8x6yc0nCHXWSWJ7IkR/bYoRqJW9KS4sDGQyqt4TGVR73k6l2s9iqIok1K6Y6P4 avqcYtQky81TFkZFBR7a6yPo27TmJ+nVP4B93rmlDxbRDxUju5E0k1t6iDDPg74EAwrs 9ERi2wZOSzyk03Rt0yU2cyxXBpHxcMCr/q3l06o8NiVz8dXE8nzsggccQlQf1Xzfuja4 xKfw== X-Gm-Message-State: AD7BkJJkEb5ZVRmxGt1OH23KZ+CdeTUKAp6CGLMaaOYgQanbzuS4ZsbwMIUs02a2r6J5Wndh1qgI3igwcSSONFRk X-Received: by 10.50.119.101 with SMTP id kt5mr8541172igb.70.1459753290810; Mon, 04 Apr 2016 00:01:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.39.5 with HTTP; Mon, 4 Apr 2016 00:01:11 -0700 (PDT) In-Reply-To: References: From: Ashesh Vashi Date: Mon, 4 Apr 2016 12:31:11 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch] Add formatted error message support in psycopg2 To: Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=089e0111c1bc5c1bfa052fa34c41 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --089e0111c1bc5c1bfa052fa34c41 Content-Type: text/plain; charset=UTF-8 Committed with minor change. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company *http://www.linkedin.com/in/asheshvashi* On Fri, Apr 1, 2016 at 5:17 PM, Akshay Joshi wrote: > Hi > > On Fri, Apr 1, 2016 at 3:53 PM, Ashesh Vashi .com> wrote: > >> Hi Akshay, >> >> I've update the patch a little bit as discussed offline. >> Also, renamed the variable 'is_cancel_transaction' to >> 'execution_aborted', and enum value to 'ASYNC_EXECUTION_ABORTED'. >> > > As per our discussion I have modified the logic and attached is the > updated patch. > Please review it. > > >> >> -- >> >> Thanks & Regards, >> >> Ashesh Vashi >> EnterpriseDB INDIA: Enterprise PostgreSQL Company >> >> >> >> *http://www.linkedin.com/in/asheshvashi* >> >> >> On Thu, Mar 31, 2016 at 4:55 PM, Akshay Joshi < >> akshay.joshi@enterprisedb.com> wrote: >> >>> Hi >>> >>> Please ignore the last two patches, While implementing Query Tool I have >>> found one more issue in poll function when run queries like "create table" >>> , "insert table". I have added exception handling before fetching the row >>> from the cursor directly. >>> >>> Attached is the modified patch. Please review it and if it looks good >>> please commit it. >>> >>> On Thu, Mar 31, 2016 at 12:37 PM, Akshay Joshi < >>> akshay.joshi@enterprisedb.com> wrote: >>> >>>> Hi >>>> >>>> On Tue, Mar 29, 2016 at 8:09 PM, Akshay Joshi >>> enterprisedb.com> wrote: >>>> >>>>> Hi All >>>>> >>>>> While implementing Query Tool, I came to know we need error message's >>>>> with some extra information and also I have faced one issue regarding >>>>> asynchronous connection polling. I have added support for formatted error >>>>> message and also fixed the issue. >>>>> >>>>> Attached is the patch file. Please review it and let me know the >>>>> review comments if any. >>>>> >>>> >>>> Apart from above, today I fixed one more issue. In case of user >>>> cancel the running transaction, poll function of psycopg2 returns >>>> psycopg2.extensions.POLL_OK, which is mislead by the caller of the >>>> function, so I have added one flag which will be true if user purposely >>>> cancel the transaction and from our poll function we return new status i.e. >>>> ASYNC_CANCEL_TRANSACTION. >>>> >>>> Attached is the modified patch. Please review it and if it looks good >>>> please commit it. >>>> >>>>> >>>>> >>>>> -- >>>>> *Akshay Joshi* >>>>> *Principal Software Engineer * >>>>> >>>>> >>>>> >>>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>>>> >>>> >>>> >>>> >>>> -- >>>> *Akshay Joshi* >>>> *Principal Software Engineer * >>>> >>>> >>>> >>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>>> >>> >>> >>> >>> -- >>> *Akshay Joshi* >>> *Principal Software Engineer * >>> >>> >>> >>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>> >>> >>> -- >>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) >>> To make changes to your subscription: >>> http://www.postgresql.org/mailpref/pgadmin-hackers >>> >>> >> > > > -- > *Akshay Joshi* > *Principal Software Engineer * > > > > *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* > --089e0111c1bc5c1bfa052fa34c41 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Committed with minor change.

--

Thanks &= amp; Regards,

Ashesh Vashi
EnterpriseDB IN= DIA: Enter= prise PostgreSQL Company

<= br>

<= a href=3D"http://www.linkedin.com/in/asheshvashi" target=3D"_blank">http= ://www.linkedin.com/in/asheshvashi


On Fri, Apr 1, 2016 at 5:17 PM, Akshay Joshi= <akshay.joshi@enterprisedb.com> wrote:
Hi=C2=A0

On Fri, Apr 1, 2016 at 3= :53 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote= :
Hi Akshay,

I've update the patch a little bit as discussed offline.
<= div>Also, renamed the variable 'is_cancel_transaction' to 'exec= ution_aborted', and enum value to 'ASYNC_EXECUTION_ABORTED'.

=C2=A0 =C2=A0As per our di= scussion I have modified the logic and attached is the updated patch.
=
=C2=A0 Please review it.
=C2=A0
=

--

Thanks & Regards,

= Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company

<= br>

<= a href=3D"http://www.linkedin.com/in/asheshvashi" target=3D"_blank">http= ://www.linkedin.com/in/asheshvashi


On Thu, Mar 31, 2016 at 4:55 PM, A= kshay Joshi <akshay.joshi@enterprisedb.com> wrot= e:
Hi=C2=A0

Please ignore the last two patches, While impl= ementing Query Tool I have found one more issue in poll function when run q= ueries like "create table" , "insert table". I have add= ed exception handling before fetching the row from the cursor directly.=C2= =A0

Attache= d is the modified patch. Please review it and if it looks good please commi= t it.=C2=A0

On Thu, Mar 31, 2016 at 12:37 PM, Akshay = Joshi <akshay.joshi@enterprisedb.com> wrote:
=
Hi=C2=A0

On Tue, Mar 29, 2016 at 8:09 P= M, Akshay Joshi <akshay= .joshi@enterprisedb.com> wrote:
=
Hi All=C2=A0

While imp= lementing Query Tool, I came to know we need error message's with some = extra information and also I have faced one issue regarding asynchronous co= nnection polling. I have added support for formatted error message and also= fixed the issue.=C2=A0

Attached is the patch file= . Please review it and let me know the review comments if any.
<= /blockquote>

=C2=A0 =C2=A0Apart from above, today= I fixed one more issue. In case of user cancel the running transaction, po= ll function of psycopg2 returns psycopg2.extensions.POLL_OK, which is misle= ad by the caller of the function, so I have added one flag which will be tr= ue if user purposely cancel the transaction and from our poll function we r= eturn new status i.e. ASYNC_CANCEL_TRANSACTION.

=
=C2=A0Attached is the modified patch. Please review it and if it= looks good please commit it. =C2=A0=C2=A0


=
--
Akshay Joshi
Principal Software Engineer=C2=A0

=
Phone: +9= 1 20-3058-9517
Mobile: +91 976-788-8246



--
Akshay Joshi
<= font color=3D"#3333FF">Principal Software Eng= ineer=C2=A0


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
<= /div>



--
Akshay= Joshi
Principal Software Engineer=C2=A0


Phone: +91 20-3058-9517
Mobil= e: +91 976-788-8246


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers=





--
<= b>Akshay Joshi<= /b>
= Principal Software Engineer=C2=A0


<= b>Phone: +91 20-3058-9517
Mobile: +91 976-788= -8246

--089e0111c1bc5c1bfa052fa34c41--