Re: [JDBC] How to just "link" to some data feed - Mailing list pgsql-general

From Heikki Linnakangas
Subject Re: [JDBC] How to just "link" to some data feed
Date
Msg-id 48464FFC.9030004@enterprisedb.com
Whole thread Raw
In response to Re: [JDBC] How to just "link" to some data feed  ("Albretch Mueller" <lbrtchx@gmail.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Klint Gore
Date:
Subject: Re: psql \e command
Next
From: Volkan YAZICI
Date:
Subject: Re: psql \e command