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

Re: PG Admin - Import from URL?

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: PG Admin - Import from URL?
Date: 2012-03-15 16:04:44
Message-ID: 20120315160443.GA19151@tux (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
James David Smith <james(dot)david(dot)smith(at)gmail(dot)com> wrote:
> I then import the data as below:
> COPY busroutes_raw from 'C:/Program Files
> (x86)/PostgreSQL/8.4/data/BusRoutes.csv' DELIMITERS ',' CSV;
> But I wonder whether it is possible to put a URL as the origin of the
> file rather than a path?

Sure, use tools like wget or other to fetch the file from internet and
raise it to stdout, pipe that to psql -c "\copy ... from 'stdin'"

(something like that, untestet)

Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

In response to


pgsql-novice by date

Next:From: Binand SethumadhavanDate: 2012-03-15 16:17:56
Subject: SEQUENCE data type (was: Re: PG Admin - Import from URL?)
Previous:From: James David SmithDate: 2012-03-15 15:08:16
Subject: PG Admin - Import from URL?

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