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 1jL8R8-00048O-K7 for pgsql-general@arkaria.postgresql.org; Sun, 05 Apr 2020 16:47:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jL8R7-0007p2-GC for pgsql-general@arkaria.postgresql.org; Sun, 05 Apr 2020 16:47:53 +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 1jL8R7-0007ou-76 for pgsql-general@lists.postgresql.org; Sun, 05 Apr 2020 16:47:53 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL8R4-0001es-Tw for pgsql-general@lists.postgresql.org; Sun, 05 Apr 2020 16:47:52 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0EE5A5C012F; Sun, 5 Apr 2020 12:47:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 05 Apr 2020 12:47:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:from:to:references:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=d /Ujxul5sgQqtkQ8oV8me3d8iWqlupQ6IaoDfP4cCJo=; b=OBWP1jW3ThihF5VIj QXyS4ZS1iReHRVrUM2CjM+GFcMcauamUSds5M6oHaSZlWROcJ8fAV+mVGgnYBbfj I/bqRO/HbZTZUtqWeAkXILiinFV8t5QGbxRGqizI69oCufsLt6cYkYY2cJSLFpSd 6NFHlSrHJvZYyGqnNJTWtr45D/NVy2JAT5Mu0IRpHnZXPeK3wqM32zuaUWEcinR2 f+O0alh7WZKdAgtysWiD2r4DpULWu92NxJLeRJMVnFhK2vHCYKRHp1xliNmJPx5R cENJ/Oji+MqrIKujih8Gtaxk0BVRgIFW4SGldVcCWeeQGUSvtKQEBAfE9zMDdqve Hmdqw== 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=fm2; bh=d/Ujxul5sgQqtkQ8oV8me3d8iWqlupQ6IaoDfP4cC Jo=; b=GGWBxRnFjttXGJdXtYcK5IXNlAZsvXsSVOBMy0WP89POmFVuPjzoaEKHg FFzJ3OjUhxGWSW/f278kNzuypQUYuM0YUXz25aAQ4TVlba+rlAU8CyU4X6OKTLiB 55kUkjS+lkNSQI7aknghOEMZVwjQL0iWPqXYUQpPXuuV0/kCh354xBYTAXR5Wqwg WWx13kZu9k/zR4j+7aVAqD4lv9kw1ksjECb66JqKyLF+4uHaxgQara2YOpmFICmj NFRhoVMY2hQQfV5cTJnnrpYWnzT0rxDzzViKJ2mAivhzPXCSlki30hgwOiHcNuEA OUSG1fnebMmzqACE6y0oCjW8HMd2w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddugddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuhffvfhfkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpehgihhthhhusgdrtg homhenucfkphepjeehrddujedvrdeltddrledvnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvh gvrhdrtghomh 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 5F277306D25D; Sun, 5 Apr 2020 12:47:49 -0400 (EDT) Subject: Re: psql show me the : and ask user input, when running one sql file From: Adrian Klaver To: arden liu , pgsql-general@lists.postgresql.org References: <86019357-d505-846a-40e4-76e90926e029@aklaver.com> Message-ID: <05c1ea17-a1a4-3a09-e2c0-4deda5a27680@aklaver.com> Date: Sun, 5 Apr 2020 09:47:48 -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: <86019357-d505-846a-40e4-76e90926e029@aklaver.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 4/5/20 9:46 AM, Adrian Klaver wrote: > On 4/5/20 5:50 AM, arden liu wrote: >> I am using psql to run this sql >> file(https://github.com/Arelle/Arelle/blob/master/arelle/plugin/xbrlDB/sql/public/xbrlPublicPostgresDB.ddl) >> >> here is my command: >> /usr/bin/psql postgresql://db_user:dbpassword@localhost:5432/my_db -f >> /tmp/xbrlPublicPostgresDB.ddl >> I do not know why it show me the : , which is asking me to input >> something. >> Can someone help me? > > Well I ran the file(basically a modified dump file) and what I found is it: > > 1) Hung on: > >  INSERT INTO industry (industry_id, industry_classification, > industry_code, industry_description, depth, parent_id) VALUES > ... > RETURNING industry_id; > > INSERT 0 4333 > > and > > INSERT INTO industry_level (industry_level_id, industry_classification, > ancestor_id, ancestor_code, ancestor_depth, descendant_id, > descendant_code, descendant_depth) VALUES > ... > RETURNING industry_level_id; > > INSERT 0 9326 > > 2) It did not hang on: > > INSERT INTO industry_structure (industry_structure_id, > industry_classification, depth, level_name) VALUES > ... > RETURNING industry_structure_id; > > INSERT 0 13 > > 3) For the hung cases all the INSERTS completed, I just needed to hit > any key to get the next INSERT statement to kick off. > > 4) I don't see anything wrong the statements, so I am wondering if it is > a shell issue? Hit Enter too soon. 5) All the other objects in the file where created. > > > >> Thanks. >> Arden > > -- Adrian Klaver adrian.klaver@aklaver.com