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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-jdbc by date

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