Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO1km-0001Ez-IZ for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 11:58:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bO1km-00039h-5K for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 11:58:00 +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 1bO1kl-00038q-PQ for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 11:57:59 +0000 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bO1ki-0000Fp-0Q for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 11:57:59 +0000 Received: by mail-io0-x22b.google.com with SMTP id b62so101929889iod.3 for ; Fri, 15 Jul 2016 04:57:55 -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=/EYe0uWfHIQkxEaQNOwYfVHYCPnsmgb/7AZxHur6oAI=; b=qwZxWgmO9Z2V45mQbOAQq2rS4f+hALLJLwVmvHw98P0QZ65dVuwJCTtkhlngEuXAQn OvFajlOtYZBnqsxyufkj8bW9LYZbUS1La4pbhZs2cjV07Cps0A4FaWtCDlg4zBB6SUaV ESuQDus+joH02kyh9Cyyoy1xIs0o9x4PTO+09uD1BgWqI8DjBuiS9Z8uyIvrpKksYZOf 2sDkbI3rHMYklJ6Aa5nozF6Gg9POBK1orjxEVJ2oP0lvWoeUHvicMemKPPiSHH1hg3AF oiQWzD/Cscjuh46R0op96BoE6l2Md1TzN0Hz9eUV5+WQF1MJhn86RnU6CGociUHbeWiB YpEQ== 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=/EYe0uWfHIQkxEaQNOwYfVHYCPnsmgb/7AZxHur6oAI=; b=F6JtvD4t3Ur7E4x18eximxfJ3NNFlAX2DuNDtRKI/HVoT07kVxZyvsTpHMX9bKKTLM J/JBydKk5BV7c5Nar/C12ISm2d0dFHQetovubL29Mg1wJ5dKoOEMJyBvSCyXdtPr1Zuo ++UEIPSu540DzFFMlDJ6mkoUh1QcBs1ZuvZJJ1uxd7hQrQdkAsJZJpnK3Cx3iNZKHxzg zVlcD4yS5h6NFiPLHuL2yYBIjCVJDgjgcPAIQrRZ6HKnUijNFlPev4Ffu2NrIyRdzrwV MSen2/3GnSy8/oaQWH+Ssl7cjWZChhU/pzC7ucjDGnWgwTnhUOmUPYOrklmDPfspbkYn B51w== X-Gm-Message-State: ALyK8tLe0se8UjAjM+OULrT+IrqF375dTMbThWqx/asKNKtlLyP4oPUveGYY8sEHWZMTkCjZad/0ch17BkjVBw== X-Received: by 10.107.201.138 with SMTP id z132mr20517037iof.156.1468583873886; Fri, 15 Jul 2016 04:57:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Fri, 15 Jul 2016 04:57:53 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 15 Jul 2016 12:57:53 +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 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? 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers