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

Re: ERROR: relation . . . does not exist

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Albretch Mueller <lbrtchx(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: relation . . . does not exist
Date: 2008-08-28 21:40:05
Message-ID: 48B71B35.2080905@iol.ie (view raw or flat)
Thread:
Lists: pgsql-general
On 28/08/2008 22:29, Albretch Mueller wrote:

> 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?

Just what it says - the relation doesn't exist 'cos you haven't created
it yet. You have to create the table first before you can COPY into it.

>  How can I fix that error, effectively creating and populating the
> tables from csv files?

Just include a CREATE TABLE statement in the same script before the COPY.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Responses

pgsql-general by date

Next:From: Fernando MorenoDate: 2008-08-28 21:41:14
Subject: log_statement not working on pl/pgsql functions
Previous:From: BillDate: 2008-08-28 21:38:54
Subject: Re: MySQL LAST_INSERT_ID() to Postgres

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