Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jm4S5-00037U-F5 for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jun 2020 00:00:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jm4S4-0005Cl-BV for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jun 2020 00:00:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jm4S2-0005CG-H4; Fri, 19 Jun 2020 00:00:12 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jm4Rz-0004sw-H6; Fri, 19 Jun 2020 00:00:09 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 634C15C01F0; Thu, 18 Jun 2020 20:00:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 18 Jun 2020 20:00:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=0 2DsJdgkn1buLdbsHenZGnSYCzh9wk37SIvLTcp92pM=; b=U9wRpzbYrieSIlWgZ egipc4sHfXID6Fm89ms0kIc4Fv8UKilX/4DKFp8Dbz2Ff7+bKm68OHwA7xElhPmf 9tfx5UvpdjO9J2gMad5ZxyxYUN+HlCDsr3fom+npXIPi5bBu6A71uRXIfpXo4gGj Uu7gchlXGACjQfDMqrqi6Rn6i3IgXuT8/+hzNcY3nhwOJ8SeT8bFepE8JxsySZLR 13L7MWVfYravjQoRgRhGRcyY8dS9ExZI3p7rTfNPDnaQXWEaeK3aqBEVE53IiGF2 x2OfXf9XPYMvFePD7oyp0YKWIso4+Db8tJ6fn1CsX2ERBfcBxMj5FY/l2/8DS268 feUvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=02DsJdgkn1buLdbsHenZGnSYCzh9wk37SIvLTcp92 pM=; b=oKmAaee752ueG9+tMFfdJI9fvgo9qarviCbg+07WwmPPNSm4xtJNmLCo2 WdKVGu6g5lXOvjWJA4ttzL5sdi/xziyy0n2tCsD6LFSiEbiGX5rHcsyXSs98f7sb gPhy32Ab0lYKwEEB+YmboNCKvuYGB5sWTrLIhYr1FDN9aZeyIpjsgzTyiMOFMI+c +FnYd0TQvkm24ACOXMCwP90hf6F/FUW5TgS0ZapSvWERJEm5k7Ae7N0lQUSWZ75p +Wa4GrVmVT1rbgrVGd6fFCt6kuYLeWtCL/1BUqopLz5vqVOlsDMbQ2t4HpA7OwsX e0+pcwycGGawfYds9O1nQJ+roN3Yw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejhedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeegfeejgefhtdduvddtvdetffdvuefgjeehteekhffh ieejgeekffetieejudetveenucffohhmrghinheprghmrgiiohhnrgifshdrtghomhenuc fkphepjeehrddujedvrdehrddvfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 59D54328006C; Thu, 18 Jun 2020 20:00:05 -0400 (EDT) Subject: Re: create batch script to import into postgres tables To: Pepe TD Vo , Christopher Browne Cc: Pgsql-admin , Pgsql-general References: <866581879.1147164.1592317256828.ref@mail.yahoo.com> <866581879.1147164.1592317256828@mail.yahoo.com> <1f5f4fd6-ad22-4823-c922-17a021c2c0d7@aklaver.com> <74046808.1129536.1592317823808@mail.yahoo.com> <3625e291-8456-3831-6205-2d73232bcd1e@aklaver.com> <1718146430.1151531.1592319564343@mail.yahoo.com> <1761277119.1163490.1592322138731@mail.yahoo.com> <732982585.145357.1592493607620@mail.yahoo.com> <1814718409.184531.1592498400894@mail.yahoo.com> <4d5841c4-9a6c-0e20-2c05-c21d3d3942df@aklaver.com> <889466258.267016.1592510085000@mail.yahoo.com> <57eddc72-9278-9e17-3df2-3cd8bb40e82d@aklaver.com> <11274973.331659.1592523468015@mail.yahoo.com> From: Adrian Klaver Message-ID: <37a9ad71-b297-96b3-9c1f-1043e75dec58@aklaver.com> Date: Thu, 18 Jun 2020 17:00:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <11274973.331659.1592523468015@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/18/20 4:37 PM, Pepe TD Vo wrote: > thank you for the link.  I did try it and it's still error > > echo 'SELECT count(*) FROM tableA;' | > C:\Program Files\PostgreSQL\11\bin\psql -U PSmasteruser -d PSCIDR -h > hostname.amazonaws.com -p 5432 This is getting old. The error is? > > I can run 'psql -u postgres -d PSCIDR -p 5432' (on Linux server, still > learning how to run it from psql shell in Window) fine from psql > prompt.  Just still wonder how to connect directly to the instance > PSCIDR from scripting in both aws and linux.  Otherwise manually run > using pgAdmin. > > v/r, > > ** > *Bach-Nga > -- Adrian Klaver adrian.klaver@aklaver.com