pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Load or Copy ??
3+ messages / 3 participants
[nested] [flat]

* Load or Copy ??
@ 2001-02-06 17:53 Sebastian <hallogammler@aol.com>
  2001-02-07 15:18 ` Re: Load or Copy ?? Patrik Kudo <kudo@partitur.se>
  0 siblings, 1 reply; 3+ messages in thread

From: Sebastian @ 2001-02-06 17:53 UTC (permalink / raw)
  To: pgsql-sql

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






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Load or Copy ??
  2001-02-06 17:53 Load or Copy ?? Sebastian <hallogammler@aol.com>
@ 2001-02-07 15:18 ` Patrik Kudo <kudo@partitur.se>
  2001-02-07 15:43   ` Re: Load or Copy ?? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Patrik Kudo @ 2001-02-07 15:18 UTC (permalink / raw)
  To: Sebastian <hallogammler@aol.com>; +Cc: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Load or Copy ??
  2001-02-06 17:53 Load or Copy ?? Sebastian <hallogammler@aol.com>
  2001-02-07 15:18 ` Re: Load or Copy ?? Patrik Kudo <kudo@partitur.se>
@ 2001-02-07 15:43   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2001-02-07 15:43 UTC (permalink / raw)
  To: Patrik Kudo <kudo@partitur.se>; +Cc: Sebastian <hallogammler@aol.com>; pgsql-sql

Patrik Kudo <kudo@partitur.se> writes:
> COPY forum FROM 'datei.csv' USING DELIMITERS '|';
> You should use either 'filename' OR stdin, not both.

Check.  You'll probably also find that you need to supply an absolute
pathname, since the backend is not running in the same directory that
your client is in.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-02-07 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-06 17:53 Load or Copy ?? Sebastian <hallogammler@aol.com>
2001-02-07 15:18 ` Patrik Kudo <kudo@partitur.se>
2001-02-07 15:43   ` Tom Lane <tgl@sss.pgh.pa.us>

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