Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO1Y7-0000BH-It for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 11:44:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bO1Y7-0007D2-1r for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 11:44:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bO1Xu-0006yo-At for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 11:44:42 +0000 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bO1Xq-0008L9-6j for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 11:44:41 +0000 Received: by mail-qk0-x229.google.com with SMTP id p74so98594616qka.0 for ; Fri, 15 Jul 2016 04:44:37 -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=wsYbAcLIorsdLGXQThjMIRNGvwn4FgoFDanACKOyTOI=; b=AsbybEdqVsO5T2erRN6tBp1pSHbSA34s9PpA2CHX1bxbTfoJHdXJFEHaWrC/b9+mX1 e7nwgDHA+vEMnkgIq1GHmb4c31NtfyxhbtHSVRjHdnHl+M5qG/GTeRieszns/RhhsU/K lKP/MsON8BhPGSr4CiORdJXPAzT9vQ5nWmfOcvLhKCdNrk06Jr9bc5a1oeVB0JX4WFcN 9kdDDIFMHhuOrnQGwsHJXvKQ9XFCJgZkYaUxgYdhuaCaSndzQVXZf8gGO3J9Coq0Unne VR+lyvGTVU+qmP8pV1GsjpZtveCYC1l6zxvp3HRBMcU8B8nBRVRMpyFnbT8ny8zNL4Wt t8yA== 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=wsYbAcLIorsdLGXQThjMIRNGvwn4FgoFDanACKOyTOI=; b=jV4qeBDKCEeZ9R2ycXHctuvlHNJKFVOwzKW2TMm1QgZB8TOlwjJRFaZChJvCda0HYx eq4WONfcDvgDXbpX2k44S2tebmX9jbl3Cz9JtslA3QqD4bshx4scYA7tlmBd0BjXMLKT Sxi2cvlE4oL02Ps4tjbSUo3qoZPSkp3N1ElQT+0tvbWf5PEa2kJcx8bBqbDj8QWVOG8P KcX6PNlTW2FYpfBb5AM2lSCgYcW6+bSMbG7G2hYjCkZIfKR2QcFEU+iAgVClM5B/A4zR jtStrtKV45i9CPO1sXK8OJgNO0YG8UgE/Oim3mTeexsMOaptEUTq6JifAREqyvEpSZhM YWOw== X-Gm-Message-State: ALyK8tIuE3KLcDv6qZCiyJimEQPBjWAoiOwTdu7zImV5xeYncznh1ZHxtmtE37iXY1SvTwHXO0U/xIRkJ1i6SQw7 X-Received: by 10.55.181.193 with SMTP id e184mr3050761qkf.181.1468583075849; Fri, 15 Jul 2016 04:44:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.8.3 with HTTP; Fri, 15 Jul 2016 04:44:16 -0700 (PDT) In-Reply-To: References: From: Murtuza Zabuawala Date: Fri, 15 Jul 2016 17:14:16 +0530 Message-ID: Subject: Re: PATCH: To fix the issue where cast function causes freeze (pgAdmin4) To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=94eb2c06229c8f3c7b0537ab2408 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 --94eb2c06229c8f3c7b0537ab2408 Content-Type: text/plain; charset=UTF-8 Hi Dave, Yes, I am aware of that, but the issue you mentioned is due to psycopg2 DictCursor issue which I have already mentioned earlier (RM#1409) https://github.com/psycopg/psycopg2/issues/454. The patch is for different issue (RM#1438). -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Fri, Jul 15, 2016 at 4:37 PM, Dave Page wrote: > On Thu, Jul 14, 2016 at 10:06 AM, Murtuza Zabuawala > wrote: > > Hi, > > > > PFA patch to fix the issue where if user use cast function and it causes > > freeze in query tool. > > (RM#1438) > > This fixes the hang, but then displays the wrong data type for the > first column - e.g. > > SELECT CURRENT_TIMESTAMP, CAST ( CURRENT_TIMESTAMP AS text ) ; > > will show the columns as "now text(8)" and "now text", when it should > be "now timestamp with time zone", "now text" > > Note that SELECT CURRENT_TIMESTAMP also gets this a little wrong - it > shows "now timestamp with time zone(8)" (the size shouldn't be > included) > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --94eb2c06229c8f3c7b0537ab2408 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dave,

Yes, I am aware of that, but t= he issue you mentioned is due to psycopg2 DictCursor issue which I have alr= eady mentioned earlier (RM#1409)=C2=A0https://github.com/psycopg/psycopg2/issues/454.

=
The patch is for different issue (RM#1438).

=
--
Regards,
= Murtuza Zabuawala
EnterpriseDB:=C2=A0http://www.enterprisedb.com
The Enterprise PostgreSQL Compa= ny


On Fri, Jul 15, 2016 at 4:37 PM, Dave Page <= span dir=3D"ltr"><dpage@pgadmin.org> wrote:
= On Thu, Jul 14, 2016 at 10:06 AM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:
> Hi,
>
> PFA patch to fix the issue where if user use cast function and it caus= es
> freeze in query tool.
> (RM#1438)

This fixes the hang, but then displays the wrong data type for the
first column - e.g.

SELECT CURRENT_TIMESTAMP, CAST ( CURRENT_TIMESTAMP AS text ) ;

will show the columns as "now text(8)" and "now text", = when it should
be "now timestamp with time zone", "now text"

Note that SELECT CURRENT_TIMESTAMP also gets this a little wrong - it
shows "now timestamp with time zone(8)" (the size shouldn't b= e
included)


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--94eb2c06229c8f3c7b0537ab2408--