Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bm0LI-0008La-JB for pgadmin-hackers@arkaria.postgresql.org; Mon, 19 Sep 2016 15:18:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bm0LI-0006Lp-6I for pgadmin-hackers@arkaria.postgresql.org; Mon, 19 Sep 2016 15:18:48 +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 1bm0LH-0006Lh-S5 for pgadmin-hackers@postgresql.org; Mon, 19 Sep 2016 15:18:47 +0000 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bm0LE-0007NT-Iv for pgadmin-hackers@postgresql.org; Mon, 19 Sep 2016 15:18:47 +0000 Received: by mail-it0-x22a.google.com with SMTP id r192so71416643ita.0 for ; Mon, 19 Sep 2016 08:18:44 -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=liY1MiULBjS8WV7YCq+09Vji5e10d0rIoEXQz2/Zctw=; b=kTM+FiSiocXy1gcJ8uG1sjl/bWsIr2UasLSfCERby1fXd2Oh4Cz9WOkWGIyNucn5Of VG5A0iqxL9F1FkGPmCKEFvaPshNvoC4oiVPOpUkwPjZj4Xr6LNDXHL3yn/vsLnq+JYtj kvbDNnS9/0yZmZCwhN0CcjKdaIecXj6q6JpscO4KtZoMYMP45eqxrda0zcgGhQcYQ4x0 jWZs5XPCK0UajpLakJZZuAvfD5VKA2+z0PByuG8KVYzjvsLjYVbLLq91I0OvjpzqppPh OVxxfYEvebQBytU3qA9rXZvzIx3yD/3bQu6SSmRvHoEBS4kej3OEAshfNEzrZG/5Foy4 ZdoA== 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=liY1MiULBjS8WV7YCq+09Vji5e10d0rIoEXQz2/Zctw=; b=lT7CRBx9h0tHAeFuDQad9Fn+YBrOzwFq+XM++o8VtE1RaHR7WES2qW/EnsEK7UeySN SallQEqPkMa/2393LNVCNPwVXrqti+GPG5BfG8vafQV6KsqpP0cm5PfmT+mrSwVHr54e ibLX5CGmw5MFLjGJoE1CB1PrlSO7wCKHFVSYQ3jWyi2AydngBsk2Kp2yJhmgcffX/7DB Hh/b2IG3bpityl80Ridfad+kDapERv/YHm1lpBy7Om0qJnzJgxYXwU3wYs1Py8m1/iga x7tlUXGbPC8j/6x2410s4vTPPN2K/+cd9WkPzOBUYI2JfL6tfrOwcY1pmLix6/Y84J1O uKLA== X-Gm-Message-State: AE9vXwN+YkjHK7hlZvklAlUZK1XqJn0JQAXTM32ExEHvVyYm1iA/ur3oftKelCEOFrlHf7N+CIHsKVqCEVdiuw== X-Received: by 10.36.246.2 with SMTP id u2mr10735663ith.103.1474298322592; Mon, 19 Sep 2016 08:18:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.1.203 with HTTP; Mon, 19 Sep 2016 08:18:41 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 19 Sep 2016 16:18:41 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM1592 - Download as CSV should be supported for DDL To: Surinder Kumar 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 Hi On Mon, Sep 19, 2016 at 3:03 PM, Surinder Kumar wrote: > Hi > > Please find attached patch with fix. >> >> Download as CSV >> button should be enabled only for SELECT queries. I'm not sure there's a way to do this without parsing the query. Simply matching on ^select certainly won't work reliably - for example, there could be multiple statements in the script, or it could be PERFORM ... or UPDATE ... RETURNING ... I think we need to leave the button enabled, but give the user a message if no data is returned, e.g. ======= Download as CSV ------------------------- The query executed did not return any data. [OK] ======== -- 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