Re: How to just "link" to some data feed

From: tivvpgsqljdbc(at)gtech-ua(dot)com
To:
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: How to just "link" to some data feed
Date: 2008-06-04 08:27:53
Message-ID: 48465209.2060900@gtech-ua.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Hello.

I'd recommend you to have some intermediate (temporary?) table to load
data to and then sync data to main table using simple insert statement.
The call list would look like
copy temptbl FROM '/tmp/codigos_postales.csv' DELIMITERS ',' CSV;
insert into maintbl select * from temptbl where cp not in (select cp
from maintbl)
delete from temptbl;
commit;

P.S. Last step is not needed if you use temporary table.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Volkan YAZICI 2008-06-04 08:28:51 Re: psql \e command
Previous Message Heikki Linnakangas 2008-06-04 08:19:08 Re: [JDBC] How to just "link" to some data feed

Browse pgsql-jdbc by date

  From Date Subject
Next Message Pushker Chaubey 2008-06-04 18:08:43 trouble with regular expression
Previous Message Heikki Linnakangas 2008-06-04 08:19:08 Re: [JDBC] How to just "link" to some data feed