Skip site navigation (1) Skip section navigation (2)

ERROR: relation . . . does not exist

From: "Albretch Mueller" <lbrtchx(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ERROR: relation . . . does not exist
Date: 2008-08-28 21:29:32
Message-ID: 9ef66fac0808281429m45e0b8afvaed114f936b5c704@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
 Hi,
~
 I created a number of csv files which I need to import into PG
tables. On the them looks like this:
~
sh-3.1# head -n 3
/media/hda3/prjx/JPack/REF/LANDMARKS/PROFILES/20080828104627_j2sdk-1_4_2_18-linux-i586.binfls.md5sum.txt
"md5sum","fl"
"d41d8cd98f00b204e9800998ecf8427e",".systemPrefs/.system.lock"
"d41d8cd98f00b204e9800998ecf8427e",".systemPrefs/.systemRootModFile"
~
 and has a totalof 565 lines
~
sh-3.1# wc -l /media/hda3/prjx/JPack/REF/LANDMARKS/PROFILES/20080828104627_j2sdk-1_4_2_18-linux-i586.binfls.md5sum.txt
565 /media/hda3/prjx/JPack/REF/LANDMARKS/PROFILES/20080828104627_j2sdk-1_4_2_18-linux-i586.binfls.md5sum.txt
~
 However, after installing pg from source (using ./configure
--without-readline --prefix=/media/hda4/pgsql/PGDBMS) and creating the
postgres user just fine (as you can see from a knoppix box):
~
root(at)Knoppix:/media/hda4/pgsql/inst/postgresql-8.3.3# adduser postgres
root(at)Knoppix:/media/hda4/pgsql/inst/postgresql-8.3.3# chown postgres
/media/hda4/pgsql/DATA
root(at)Knoppix:/media/hda4/pgsql/inst/postgresql-8.3.3# su - postgres
No directory, logging in with HOME=/
postgres(at)Knoppix:/$ cd /media/hda4/pgsql/PGDBMS/bin
postgres(at)Knoppix:/media/hda4/pgsql/PGDBMS/bin$ initdb -D /media/hda4/pgsql/DATA
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

fixing permissions on existing directory /media/hda4/pgsql/DATA ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 24MB/153600
creating configuration files ... ok
creating template1 database in /media/hda4/pgsql/DATA/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    postgres -D /media/hda4/pgsql/DATA
or
    pg_ctl -D /media/hda4/pgsql/DATA -l logfile start

// __ then starting PG
postgres(at)Knoppix:/media/hda4/pgsql/PGDBMS/bin$ postgres -D
/media/hda4/pgsql/DATA >logfile 2>&1 &
postgres(at)Knoppix:/media/hda4/pgsql/PGDBMS/bin$ chown postgres
/media/hda4/pgsql/LOGS
postgres(at)Knoppix:/media/hda4/pgsql/PGDBMS/bin$ postgres -D
/media/hda4/pgsql/DATA > /media/hda4/pgsql/LOGS/logfile 2>&1
[1] 16712
postgres(at)Knoppix:/media/hda4/pgsql/PGDBMS/bin$ createdb jpk;
postgres(at)Knoppix:/media/hda4/pgsql/PGDBMS/bin$ psql jpk;
Welcome to psql 8.3.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

jpk=# COPY j2sdk_1_4_2_18_binfls_md5sum FROM
'/media/hda3/prjx/JPack/REF/LANDMARKS/PROFILES/20080828104627_j2sdk-1_4_2_18-linux-i586.binfls.md5sum.txt'
CSV HEADER;
ERROR:  relation "j2sdk_1_4_2_18_binfls_md5sum" does not exist
~
 What is going on here?
~
 How can I fix that error, effectively creating and populating the
tables from csv files?
~
 Thanks
 lbrtchx

Responses

pgsql-general by date

Next:From: BillDate: 2008-08-28 21:32:41
Subject: Re: SQL optimization - WHERE SomeField STARTING WITH ...
Previous:From: BillDate: 2008-08-28 21:26:16
Subject: Re: MySQL LAST_INSERT_ID() to Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group