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

Re: [JDBC] How to just "link" to some data feed

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Albretch Mueller" <lbrtchx(at)gmail(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>,<pgsql-general(at)postgresql(dot)org>,"Oliver Jowett" <oliver(at)opencloud(dot)com>
Subject: Re: [JDBC] How to just "link" to some data feed
Date: 2008-06-04 08:19:08
Message-ID: 48464FFC.9030004@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-jdbc
Albretch Mueller wrote:
>  import/export the data into/out of PG, so you will be essentially
> duplicating the data and having to synch it. This is exactly what I am
> trying to avoid, I would like for PG to handle the data right from the
> data feed

You could write a set-returning function that reads the file, and 
perhaps a view on top of that. As the file is read on every invocation, 
that's only practical for small tables, though.

It's likely a better idea to just COPY the table into the database 
periodically, or perhaps write an external script that watches the 
modification timestamp on the file and triggers a reload whenever it 
changes.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-jdbc by date

Next:From: tivvpgsqljdbcDate: 2008-06-04 08:27:53
Subject: Re: How to just "link" to some data feed
Previous:From: Stephen DenneDate: 2008-06-04 04:32:33
Subject: Re: [JDBC] How to just "link" to some data feed

pgsql-general by date

Next:From: tivvpgsqljdbcDate: 2008-06-04 08:27:53
Subject: Re: How to just "link" to some data feed
Previous:From: Klint GoreDate: 2008-06-04 08:12:16
Subject: Re: psql \e command

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