Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO2Ls-0003ou-FA for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 12:36:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bO2Lr-00062e-Tp for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 12:36:19 +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 1bO2Lf-0005ou-2i for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 12:36:07 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bO2LW-00017Y-CN for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 12:36:06 +0000 Received: by mail-io0-x230.google.com with SMTP id m101so102655327ioi.2 for ; Fri, 15 Jul 2016 05:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tmsgYJHqybm4d7SbwVoHK2NSkSpVTPmlOmcXgfJVch8=; b=01fB6nYdgp4oqndQXWmtIu65c2DFmpeYOOH9bYcCzA2Ma/t4PJUXXtYeq2QMnJeTm4 XMFG/XpKAHKtu5HTcxDd2e2dMztz7x1hMl442whH/EvM/pXNhCtF/gad6le/FSzmNEoV 4gnaDcIpGZOBXSAFZHvzDl5x3WDX1fp14h3HiMWgmBtlZJZ+l5XbvJw46j8qav9Hg8/a M5kpkcT3BUVQOnzRI8qJeTid0/ZVaQhv/e5s9kOstkJ58h6VgI1RiMMA+a/sWcZN701Q jKL0ZN5pxYYxXB11HLXfyx0jIYdSribfLJdSsD80Cxqu/1Q/e8Nn9nJDO5M8eKVC0BuT WGMQ== 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=tmsgYJHqybm4d7SbwVoHK2NSkSpVTPmlOmcXgfJVch8=; b=hSaHQbpFgNHmtCl+ruN+SpqpLa4ymuSdCEJe/64jQmRQshgT57pHd0q4wR9MsZpDQa 5AzSiExMwhoDM8x9T7dBg01K3FBbPf854FqJm7qcZvMdZb+2xt54Yf9ouUHT/9H4yMBs 6OY5BUSBPrbUvSwkm9w+gvAQbqQykuLQPCt/WMIpO1LX6wFIaPJ4i2E87o17J8azPWVm xTS9OYydDxix3fPQecP3/ywJfyVaI9KtSsV45JO7Xy/G9Ncf5AbeeNSHik93FqvlYzNe p6NDjKSMFbEFfkYKppfR92RAToP506gHZo0Swf48R1QT7M7MyYcEeQJXKl9CmowzOlpy tXDQ== X-Gm-Message-State: ALyK8tKOahZvbiv1vMPOOayJh51AVusPktFawC8izaaQCpoAPkFnynfHEk0OU9HMxCMds+Vs8EfjZIfEDlefcw== X-Received: by 10.107.183.85 with SMTP id h82mr21301696iof.63.1468586156121; Fri, 15 Jul 2016 05:35:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Fri, 15 Jul 2016 05:35:55 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 15 Jul 2016 13:35:55 +0100 Message-ID: Subject: Re: PATCH: To fix the issue where cast function causes freeze (pgAdmin4) To: Murtuza Zabuawala Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 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 On Fri, Jul 15, 2016 at 1:25 PM, Murtuza Zabuawala wrote: > > > On Fri, Jul 15, 2016 at 5:27 PM, Dave Page wrote: >> >> OK, so the type names are affected by the duplicate column names, and >> need to be avoided by using indexes and avoiding dicts. That's issue >> #1409. >> >> The second issue is that "SELECT CURRENT_TIMESTAMP" gives us "now >> timestamp with time zone (8)". Is the (8) also part of issue #1409, or >> some other bug? >> > (I though it's by design that we are displaying size with every column) Definitely not - it's a bug. Only types that take size parameters should display them. > But this is not related to RM#1409 or RM#1438. > >> >> The third issue is fixed by this patch, so I'll commit that as there's >> a ticket for the other bit already). >> >> On Fri, Jul 15, 2016 at 12:49 PM, Murtuza Zabuawala >> wrote: >> > ++ FYI, >> > >> > If you provide alias, it'll give you proper result :) >> > >> > SELECT CURRENT_TIMESTAMP as ts, CAST ( CURRENT_TIMESTAMP AS text ) as >> > ts_as_text; >> > >> > >> > -- >> > Regards, >> > Murtuza Zabuawala >> > EnterpriseDB: http://www.enterprisedb.com >> > The Enterprise PostgreSQL Company >> > >> > On Fri, Jul 15, 2016 at 5:14 PM, Murtuza Zabuawala >> > wrote: >> >> >> >> 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 >> >> >> >> >> > >> >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers