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 1gVHQG-0003bW-Aw for pgsql-general@arkaria.postgresql.org; Fri, 07 Dec 2018 14:48:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gVHQD-0006Yj-Ig for pgsql-general@arkaria.postgresql.org; Fri, 07 Dec 2018 14:48:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVHQB-0006Yb-7s for pgsql-general@lists.postgresql.org; Fri, 07 Dec 2018 14:48:04 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVHQ2-0002UZ-EG for pgsql-general@lists.postgresql.org; Fri, 07 Dec 2018 14:48:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8AA2E375; Fri, 7 Dec 2018 09:47:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 07 Dec 2018 09:47:52 -0500 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=fm1; bh=V VCW2Dgiv+dJNJ+HukD0E0icy7ib1XqwpBiu9Bk5MuE=; b=Wb1eXZdYXhem+cJfM 3mq/epFct41l+e65PQMhJx6Zg3WWGsNGBodZtJTz5O7P+PdYL262rDJvFr07Sxjr sx86scyZc3pHexqpyRJdzrKll2I204xmY6IRaHDsiKLbfTbqYc+/wVx1L7D/z2QK p1X5AD9bZJRry5hW7KLuJUMyJ2SJIIC+kj0Uw4Mp9fAjt5vb2yerQKucw3c2oaBD yZF38las13B1fY64dSZj3lQAQlE/S158rJF9c5uBD8fSzRRh2uqq8xNP7ACba2aA OQ4Rbohcjp5azL4R8Qvnl76Iaiz+yAKQv08Qqk4xfzPMgyh3Z8B4dZMABHpgbjAY sSgaA== 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=fm1; bh=VVCW2Dgiv+dJNJ+HukD0E0icy7ib1XqwpBiu9Bk5M uE=; b=oiq0a8OR18Yt/d7ZgWDXXluzKVUDLrNxXUjB5O0kR9R4sxIQ974qcdCLy wau90habrEkZBGuD/1KIGHqzX7HZNxuwa6vMk0TFGAxA5BySX4s9TYmd21S6JtTU PgWxW9CVtfEcL1EuretjsIkc5ZkOnRBMW19bmKX0UMWOgiAAFkmCqAIjVU7FIqKL 4fuUt8sdXLNhu6sqY4hx1w/HA4URn+bUWDPqR2D5Hrvtokug95np5Hkvqu7KovoK TuElhdjVnFFpu6JnEEtFDkQ6chK5c+QVvogndf1F/daxgQaarOIejibgKpSohhne STB3iz7yxVEvCT8cHwpha90oDOQ9w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudefledgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomh eptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghv vghrrdgtohhmqeenucffohhmrghinhepphhgrggumhhinhdrohhrghdpshhouhhrtggvfh horhhgvgdrnhgvthdpuggvfhgruhhlthdrhhhofienucfkphepjedurddvuddvrddufeeg rdefnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkh hlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id B1504102E8; Fri, 7 Dec 2018 09:47:50 -0500 (EST) Subject: Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI To: s400t@yahoo.co.jp, rob stone , "pgsql-general@lists.postgresql.org" References: <1892755171.196556.1544154847195.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1892755171.196556.1544154847195.JavaMail.yahoo@mail.yahoo.co.jp> <1c54581d-541d-10d9-138c-55b87ecded2c@aklaver.com> <5e4cd2243e4e89afdad1ab7fb503825084f771ab.camel@gmail.com> <1078893091.227120.1544171298546.JavaMail.yahoo@mail.yahoo.co.jp> From: Adrian Klaver Message-ID: <4969722f-8869-fa9b-d843-05bc863306f4@aklaver.com> Date: Fri, 7 Dec 2018 06:47:49 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <1078893091.227120.1544171298546.JavaMail.yahoo@mail.yahoo.co.jp> 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 12/7/18 12:28 AM, s400t@yahoo.co.jp wrote: > Hello Adrian, Rob! > > Thank you for the comments. > > Oh, yes, I forgot to mention that I am using Postgresql version 9.6. > I had read somewhere that last supported version was 9.3 or something, > could be 9.2 as you say. > > I wanted to use phpPgAdmin, that's why I went back to 9.6 even if I had > installed ver. 10 first. > But if the phpPgAdmin quotes identifiers by defaults, I will need to > look for some other ways. I don't think the quoted identifiers are the issue. I am suspecting that the import code may be trying to INSERT into the wrong version of the table. Some questions: 1) Which schema did you create spec in? 2) In psql what does \d spec show? > > Strictly speaking, I don't need to use the phpPgAdmin, but I am trying > to find a GUI way to upload a file quickly (the file has thousands of > records.) > > Now, I am using pyDev in Eclipse to insert records, but I need to use a > web-based click and upload. ? https://www.pgadmin.org/ > > If I could find a php version of my python code that would be great! > My Python code: > > cur = conn.cursor() > > with io.open(fileName,'r',encoding='utf8') as f: >     next(f)  # Skip header row. >     cur.copy_from(f, tableName, sep='\t') > conn.commit() > cur.close() > f.close() > > > I have found PHP samples for line by line read and insert, but that will > be too slow for me. > > Cheers! > > > > ----- Original Message ----- > *From:* rob stone > *To:* Adrian Klaver ; s400t@yahoo.co.jp; > "pgsql-general@lists.postgresql.org" > > *Date:* 2018/12/7, Fri 16:47 > *Subject:* Re: Importing tab delimited text file using phpPgAdmin > 5.1 GUI > > Hello, > > On Thu, 2018-12-06 at 21:29 -0800, Adrian Klaver wrote: > > On 12/6/18 7:54 PM, s400t@yahoo.co.jp > wrote: > > > > Most GUI tools I am familiar with quote identifiers by default. > > > How/where can I tell the phpPgAdmin not to add that extra "" around > > > the > > > field name? > > > > I don't know. I have been under the impression that phpPgAdmin was > > no > > longer maintained/in use. > > > > You might have more luck here: > > > > https://sourceforge.net/p/phppgadmin/discussion/115884 > > > > > > > > Thanks for reading and suggestions. > > > > > > If you look at phppgadmin on sourceforge, the tarball files are all > dated April 15th., 2013. > It appears to have stalled at Postgres version 9.2. > I doubt if it will run on versions 10 or 11. > > Cheers, > Rob > > > > > > -- Adrian Klaver adrian.klaver@aklaver.com