Re: ERROR: relation . . . does not exist - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: ERROR: relation . . . does not exist
Date
Msg-id 48B71B35.2080905@iol.ie
Whole thread Raw
In response to ERROR: relation . . . does not exist  ("Albretch Mueller" <lbrtchx@gmail.com>)
Responses Re: ERROR: relation . . . does not exist  ("Albretch Mueller" <lbrtchx@gmail.com>)
List 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@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: Bill
Date:
Subject: Re: MySQL LAST_INSERT_ID() to Postgres
Next
From: "Fernando Moreno"
Date:
Subject: log_statement not working on pl/pgsql functions