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 1jL9hv-0005yb-Rt for pgsql-general@arkaria.postgresql.org; Sun, 05 Apr 2020 18:09:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jL9ht-0000rj-Hx for pgsql-general@arkaria.postgresql.org; Sun, 05 Apr 2020 18:09:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL9hr-0000rc-NB for pgsql-general@lists.postgresql.org; Sun, 05 Apr 2020 18:09:17 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL9hk-0005uz-Bp for pgsql-general@lists.postgresql.org; Sun, 05 Apr 2020 18:09:15 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E2332830; Sun, 5 Apr 2020 14:09:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 05 Apr 2020 14:09:05 -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=fm2; bh=T GSiGJzSYYJoUQQKQb90hPD69s/pTqYpkjFFd1OsxgY=; b=pd3zePKhiimurm1sv lYrz6p1pDVIbwrFooTR0b0L+8bOidCSK0IWJSVcYSYkJAhr4B3IgM4ucCJhU48Oe 1aQEVJLUvPpp8mPgn5x4G+hYGp9biBtBD6z+XfnNKB6lCCIjxfJX6dks94t258y0 7snI165nd4KB7fczGoR7fWH1yH7Jgirol3CynvepPWILgX/3V6lbZsp5jcetHDvT N6mmP7HZI5EEX0uAEwUb5lMbq9GgEVOGZh2PrSNPWsqcmm5hCoqZeJM5iSKq7gvY d72EMgNou8vbXskH4R0Rz6ju5K0qQCaC7wS4rjGJqjsg+/mBh638EiMHK0BbSI+Z dXNww== 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=fm2; bh=TGSiGJzSYYJoUQQKQb90hPD69s/pTqYpkjFFd1Osx gY=; b=Z15OijjHPJZElxfwKvdzLhuAy8U643IqSAmVPwRg/+iHehMden+wOqE4a XKVvuf5w9m1SSkdTbkJ/zTDajNisK72ew6c3An/5PcmRsAjqPbg/8E491wzArYAI ageF6laSQCWJZ+Hojv+SRZg4XYEPIm6qFPFZPkC0kt4HHpZGLSORlb1K2gFjn+Vy WTPax4p9EMfqh95bVirh4QWJl4itrJA9eS5fPzfAmpAKDzBl5b/tyl7TzgySZdBE 3VuQDqTxH57H+RSXwrwCJ4KgLDh5D65Cazn/y45ieHuJHdsskavU30K3gzKwcPYB Kc+p5ZzF39oOhu14bk2oMR0TagS9Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddugdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecukfhppeejhedrudejvddrledtrdelvd enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (75-172-90-92.tukw.qwest.net [75.172.90.92]) by mail.messagingengine.com (Postfix) with ESMTPA id 0766F306D2A4; Sun, 5 Apr 2020 14:09:03 -0400 (EDT) Subject: Re: psql show me the : and ask user input, when running one sql file To: arden liu Cc: pgsql-general@lists.postgresql.org References: <86019357-d505-846a-40e4-76e90926e029@aklaver.com> From: Adrian Klaver Message-ID: Date: Sun, 5 Apr 2020 11:09:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 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 4/5/20 10:51 AM, arden liu wrote: > Does that RETURNING need any user input? No. I just think actually returning those thousands of values is stalling the shell. It also not really necessary for the loading as 'INSERT 0 4333' shows you what you need to know. Unless you have super vision and recall you are not going to track those values anyway. You can verify in the table itself. I would see if you could get the project to output the file using COPY to load the tables instead of INSERT anyway. The file is pretty much Postgres specific anyway as it doing things like: 1) DROP SCHEMA public CASCADE; create SCHEMA public; SET statement_timeout = 0; SET client_encoding = 'UTF8'; -- HF - must have conforming strings on for Postgres interface to work, as it will include Windows paths sometimes SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = public, pg_catalog; 2) ALTER TYPE public.ancestry OWNER TO postgres; > > On Sun., Apr. 5, 2020, 1:10 p.m. Adrian Klaver, > > wrote: > > On 4/5/20 9:46 AM, Adrian Klaver wrote: > > On 4/5/20 5:50 AM, arden liu wrote: > > > 4) I don't see anything wrong the statements, so I am wondering > if it is > > a shell issue? > > Seems to be. I removed the RETURNING *_id from the INSERT statements > and > the file ran without interruption: > > ... > CREATE TABLE > ALTER TABLE > INSERT 0 4333 > INSERT 0 9326 > INSERT 0 13 > ALTER TABLE > ALTER TABLE > ... > > > > > > > > >> Thanks. > >> Arden > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com