Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUE9o-0001zH-Qb for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 14:25:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUE9o-0000LV-DE for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 14:25:28 +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 1bUE9o-0000LO-0F for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 14:25:28 +0000 Received: from mail-it0-f41.google.com ([209.85.214.41]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bUE9k-00031H-FX for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 14:25:27 +0000 Received: by mail-it0-f41.google.com with SMTP id j124so173974350ith.1 for ; Mon, 01 Aug 2016 07:25:23 -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; bh=kCQRhlvDZXys6YCp9IJuk8X4btu6Ihug7LzUCayanoE=; b=QWDiTv2rzK44/ukV66pZx3q4lSKc+FaxqxnsbQCuVMEaX1H0HeWYNf+X8bNd/Ondnc afBQsHqEsLUZpwaft1HmdexYZ4eQXvgjD6XlsdbEtcZiIR56cmY4bW3hUDfbxrfcOZcO 5CyYc+hi6YPp3WKeBSaujUiQqizEdnfoeML7vfk+iQ7CwCB92oNytWTaVnvoSXWxz3bg FH/EQzkafIJA2G3tWsnZibAEQh9BIk0UngnroFn/ab3hP7XbnI26h2KiLpogwH8isRzn qjIbiOJ8xmfU/oQ+M+EtIn8IzfFT6QgmxDRp1ygobpr6IJhkFnKd06juL07DsGcb4fxq fV+g== 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; bh=kCQRhlvDZXys6YCp9IJuk8X4btu6Ihug7LzUCayanoE=; b=RLyTUL9xx1h7JS6iVWyGjX8JghrrfcuhV3j+se2vDtTVkXdD3BSCy7o5dtcKFEieIF lkmYCQ2Ng3uZUEfjJcmU8w/hBAbVrkHiWNQEUHZCvyhSjGCZFtfjCb4Oc3rsO8X/OKXm zGLNYglf1fOJmACXfXnv6vP1vw78iC4UFOZAU3tR73aFnhBYh/Cw8BurHi4V1RCfy8Wu EIhkaj4gXKcxFxE26nhouINsCiwPHeQgDECgvlgcbmSFtZZjIpSayFE7XnjOBVZhIWFE fiya2Srht3mxBeM4Avm6CP1ESXcEt2fSOZX+pia+8tEvi5EsNqvGuk9pGXMS6pJq4OED RmQA== X-Gm-Message-State: AEkoouvaKOgSJ1VchXH7sinYUlUH58+IdiiUmKULNXnQ0KtAaNdhzXjLHHdzADPMn0wh4yRDJ5UQQ2YZtW/LeQ== X-Received: by 10.36.2.18 with SMTP id 18mr55323275itu.35.1470061460121; Mon, 01 Aug 2016 07:24:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Mon, 1 Aug 2016 07:24:19 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 1 Aug 2016 15:24:19 +0100 Message-ID: Subject: Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4) To: Murtuza Zabuawala , 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 Mon, Aug 1, 2016 at 2:53 PM, Murtuza Zabuawala wrote: > Yes... :-) OK, committed with the following: # If schema is public, prefix it. Otherwise, we should already have it. if row['nspname'] == 'public': rtn_type = "public." + row['typname'] else: rtn_type = row['typname'] > On Mon, Aug 1, 2016 at 7:16 PM, Dave Page wrote: >> >> On Mon, Aug 1, 2016 at 2:33 PM, Murtuza Zabuawala >> wrote: >> > Hi Dave, >> > >> > We have to added it because postgres format_type() function do not >> > provide >> > us type with 'public' schema prefix to it, due to which wrong SQL's are >> > getting generated. >> > Rest other types are pre fixed with their respective schema as required. >> >> OK, so: >> >> # If schema is not pg_catalog & then add schema >> if row['nspname'] == 'public': >> rtn_type = row['nspname'] + "." + row['typname'] >> else: >> rtn_type = row['typname'] >> >> ? >> >> != pg_catalog is redundant with == public. >> >> -- >> 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