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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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