From: Adrian Klaver <adrian.klaver@aklaver.com>
To: s400t@yahoo.co.jp
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI
Date: Thu, 6 Dec 2018 21:29:56 -0800
Message-ID: <1c54581d-541d-10d9-138c-55b87ecded2c@aklaver.com> (raw)
In-Reply-To: <1892755171.196556.1544154847195.JavaMail.yahoo@mail.yahoo.co.jp>
References: <1892755171.196556.1544154847195.JavaMail.yahoo.ref@mail.yahoo.co.jp>
<1892755171.196556.1544154847195.JavaMail.yahoo@mail.yahoo.co.jp>
On 12/6/18 7:54 PM, s400t@yahoo.co.jp wrote:
> Hello Community!
>
> I am trying to use phpPgAdmin (ver. 5.1 with PHP 5.6.39, server CentOS
> 7, client Win-10 (Japanese)) to import a tab delimited text file (Excel
> -> save as tab delimited text; also used notepad to save the same text
> file UTF-8 encoding) .
>
> Earlier. I had created a table (no columns have double quotes, not mixed
> case), for example, like this:
>
> CREATE TABLE spec (
> rec_id VARCHAR(32)PRIMARY KEY NOT NULL,
> title_category VARCHAR(255),
> doc_type VARCHAR(255),
> etc);
>
> In my tab delimited text file, first row has column names (without "")
> and starting from second row, data, some with double quotes, some with
> comma, some with brackets.
>
> When I uploaded the file for the phpPgAdmin to import, I got the
> following error:
>
> //------------------------------------------------------------------
> ERROR: column "rec_id" of relation "spec" does not exist
> LINE 1: INSERT INTO "public"."spec" ("rec_id","title_c...
> //------------------------------------------------------------------
>
> Why that extra "" in the field name? I don't have it in my text file!
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.
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, s400t@yahoo.co.jp
Subject: Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI
In-Reply-To: <1c54581d-541d-10d9-138c-55b87ecded2c@aklaver.com>
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>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox