pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
data import
5+ messages / 4 participants
[nested] [flat]

* data import
@ 2010-12-21 11:34  Viktor Bojović <viktor.bojovic@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Viktor Bojović @ 2010-12-21 11:34 UTC (permalink / raw)
  To: pgsql-sql

Hi,

can anyone recommend me a windows and linux free tools for importing data
into postgre.
Source files are CSV or excel.

Thanx in advance
-- 
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

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

* Re: data import
@ 2010-12-21 11:36  Pavel Stehule <pavel.stehule@gmail.com>
  parent: Viktor Bojović <viktor.bojovic@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Pavel Stehule @ 2010-12-21 11:36 UTC (permalink / raw)
  To: Viktor Bojović <viktor.bojovic@gmail.com>; +Cc: pgsql-sql

Hello

2010/12/21 Viktor Bojović <viktor.bojovic@gmail.com>:
> Hi,
>
> can anyone recommend me a windows and linux free tools for importing data
> into postgre.
> Source files are CSV or excel.

PostgreSQL can read a CVS files via a COPY statement. You can use a
\copy metacommand too from psql

Regards

Pavel Stehule

> Thanx in advance
> --
> ---------------------------------------
> Viktor Bojović
> ---------------------------------------
> Wherever I go, Murphy goes with me
>



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

* Re: data import
@ 2010-12-21 12:04  Achilleas Mantzios <achill@matrix.gatewaynet.com>
  parent: Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Achilleas Mantzios @ 2010-12-21 12:04 UTC (permalink / raw)
  To: pgsql-sql

Στις Tuesday 21 December 2010 13:36:58 ο/η Pavel Stehule έγραψε:
> Hello
> 
> 2010/12/21 Viktor Bojović <viktor.bojovic@gmail.com>:
> > Hi,
> >
> > can anyone recommend me a windows and linux free tools for importing data
> > into postgre.
> > Source files are CSV or excel.
> 

Openoffice can do this job, populating a table from an excel data source,
but every time i do it (which is not often) it is like reinventing the wheel again.
The way to do it, IIRC, is to "create" a database based on your existing excel data source.
After that you can copy data from this "excel-powered" database to your normal pgsql database, fairly easily.
It is easy actually, just not so straight forward as most people would want.

> PostgreSQL can read a CVS files via a COPY statement. You can use a
> \copy metacommand too from psql
> 
> Regards
> 
> Pavel Stehule
> 
> > Thanx in advance
> > --
> > ---------------------------------------
> > Viktor Bojović
> > ---------------------------------------
> > Wherever I go, Murphy goes with me
> >
> 



-- 
Achilleas Mantzios



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

* Re: data import
@ 2010-12-21 16:18  Chris Ruprecht <chris@ruprecht.org>
  parent: Viktor Bojović <viktor.bojovic@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Chris Ruprecht @ 2010-12-21 16:18 UTC (permalink / raw)
  To: pgsql-sql

If your file is TAB delimited, you can simply do:

\copy tablename from 'some file'

To get details in psql, do:
psql mydatabase
and at the prompt:
\h copy



On Dec 21, 2010, at 06:34 , Viktor Bojović wrote:

> Hi,
> 
> can anyone recommend me a windows and linux free tools for importing data into postgre.
> Source files are CSV or excel.
> 
> Thanx in advance
> -- 
> ---------------------------------------
> Viktor Bojović
> ---------------------------------------
> Wherever I go, Murphy goes with me




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

* Re: data import
@ 2010-12-29 01:45  Viktor Bojović <viktor.bojovic@gmail.com>
  parent: Chris Ruprecht <chris@ruprecht.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Viktor Bojović @ 2010-12-29 01:45 UTC (permalink / raw)
  To: Chris Ruprecht <chris@ruprecht.org>; +Cc: pgsql-sql

Thanx Chris.
Also i want to thank Achilleas and Pavel for help

On Tue, Dec 21, 2010 at 5:18 PM, Chris Ruprecht <chris@ruprecht.org> wrote:

> If your file is TAB delimited, you can simply do:
>
> \copy tablename from 'some file'
>
> To get details in psql, do:
> psql mydatabase
> and at the prompt:
> \h copy
>
>
>
> On Dec 21, 2010, at 06:34 , Viktor Bojović wrote:
>
> > Hi,
> >
> > can anyone recommend me a windows and linux free tools for importing data
> into postgre.
> > Source files are CSV or excel.
> >
> > Thanx in advance
> > --
> > ---------------------------------------
> > Viktor Bojović
> > ---------------------------------------
> > Wherever I go, Murphy goes with me
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>



-- 
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

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


end of thread, other threads:[~2010-12-29 01:45 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21 11:34 data import Viktor Bojović <viktor.bojovic@gmail.com>
2010-12-21 11:36 ` Pavel Stehule <pavel.stehule@gmail.com>
2010-12-21 12:04   ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2010-12-21 16:18 ` Chris Ruprecht <chris@ruprecht.org>
2010-12-29 01:45   ` Viktor Bojović <viktor.bojovic@gmail.com>

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