Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hmsOB-0000Zg-6G for pgsql-general@arkaria.postgresql.org; Mon, 15 Jul 2019 04:15:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hmsO9-0004qk-TA for pgsql-general@arkaria.postgresql.org; Mon, 15 Jul 2019 04:14:57 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hmsO8-0004pk-5C for pgsql-general@lists.postgresql.org; Mon, 15 Jul 2019 04:14:57 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hmsO3-0006jc-Gx for pgsql-general@postgresql.org; Mon, 15 Jul 2019 04:14:55 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A6C7F22085; Mon, 15 Jul 2019 00:14:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 15 Jul 2019 00:14:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=L cN9KJu00WVEyr47jfZRMOXOZXjfy/Awaq2ehNlYtWY=; b=Z2juaJWnxS4xBSNnU TD5GcE2XdBjKrA5a8Bc+INHGPIfHlTI4IN/hvgKOsDimfs2jMOanQp6xqhniS6Se PaiWu0plkPgF5UXGhimDPBCanX20OD9WntObcB2BFX8GHHYhv2fjsOZL6a3+3uVG jxuNF99TxNitHEcuXSF06GTwWfRe1/Xo6wYIXpSImWiFmiEMtTTdQPYy4DQH3EEE MVbvo1Lymqqy8RK4b3uNu92oBzGNk60v6qxu0ylBSqcxkE4EiqlxATI/7ZRHkXSl xs5qyIa1hfBZD49HW9Th8O6Va98Oz7WiNpxqAsntP+GL+yN+A19JL28FkXu+cLu4 ObgpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=LcN9KJu00WVEyr47jfZRMOXOZXjfy/Awaq2ehNlYt WY=; b=XhXTvoZvjMm30f8yBmK3UOYuZYFXSsGEhormH0GzIi/mndfSOnBmcXVYT 1CF4tyJI0/BUNiRv96dyUXzJskmeFHUObBAmHUId4mYJ+mI56MUeEz4UOooXdNv0 8dlgvUSV25G48xi0veNoanjDSqEikwCW8TDrwNHqTC2SP+xmdSY6A8UiEzgpaUl0 ZOEyvD+qHv4g12HMcTwdGjBRTpJiH/A8E9cAjj7AujOgaMo5qEkrc5Dg54q4hF4q HWEN4H5cGXvPKja+SPsSfAB9ZXREJJ2Lb1d+gB5yZHyTpMQz6Z0aZk+iSI29EAcJ v7RY80XasvdOKKIsJtid1KtJiKURA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrheejgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehpohhsthhgihhsrdhnvghtnecukfhppeejuddrvdduvddrudeh tddrvddtvdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id E480A80060; Mon, 15 Jul 2019 00:14:48 -0400 (EDT) Subject: Re: how to execute pgsql2shp exe in sql To: sunpeng , PostgreSQL general References: From: Adrian Klaver Message-ID: Date: Sun, 14 Jul 2019 21:14:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/14/19 8:54 PM, sunpeng wrote: > Could I use the following in psql or in a sql : > "D:\PostgreSQL\9.6\bin\pgsql2shp ...." It's a command line program. See the docs: https://postgis.net/docs/using_postgis_dbmanagement.html 4.5.2. Using the Dumper The pgsql2shp table dumper connects directly to the database and converts a table (possibly defined by a query) into a shape file. The basic syntax is: ... > > thanks > peng -- Adrian Klaver adrian.klaver@aklaver.com