pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Patrik Kudo <kudo@partitur.se>
To: Sebastian <hallogammler@aol.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Load or Copy ??
Date: Wed, 7 Feb 2001 16:18:15 +0100 (CET)
Message-ID: <Pine.BSF.4.31.0102071614410.90380-100000@tb303.partitur.se> (raw)
In-Reply-To: <95pdei$lmt$1@news.tht.net>

Hi

try

COPY forum FROM 'datei.csv' USING DELIMITERS '|';

You should use either 'filename' OR stdin, not both.

Hope it helps.

Regards,
Patrik Kudo

--
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Känns det oklart? Fråga på!

On Tue, 6 Feb 2001, Sebastian wrote:

> Hi
>
> What is wrong?
>
> $result = pg_Exec($db,"COPY forum FROM {'datei.csv' | stdin} USING
> DELIMITERS '|';");
>
> I will load datei.csv into forum!
>
> This is for MySQL:
>
> $result = pg_Exec($db,"LOAD DATA INFILE 'datei.csv' INTO TABLE forum FIELDS
> TERMINATED BY '|' LINES TERMINATED BY '\n'");
>
> And for PostgreSQL:
> ????????????????????
>
> Regards, Sebastian
>
>
>
>




view thread (3+ messages)  latest in thread

Message-ID: <Pine.BSF.4.31.0102071614410.90380-100000@tb303.partitur.se>
Permalink:  ../Pine.BSF.4.31.0102071614410.90380-100000@tb303.partitur.se/
Also on:    postgresql.org/message-id/Pine.BSF.4.31.0102071614410.90380-100000@tb303.partitur.se

 · 

reply

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-sql@postgresql.org
  Cc: kudo@partitur.se, hallogammler@aol.com
  Subject: Re: Load or Copy ??
  In-Reply-To: <Pine.BSF.4.31.0102071614410.90380-100000@tb303.partitur.se>
  References: <95pdei$lmt$1@news.tht.net> <Pine.BSF.4.31.0102071614410.90380-100000@tb303.partitur.se>

* 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