Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D2D821337B53 for ; Mon, 3 Jan 2011 20:14:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 36736-10 for ; Tue, 4 Jan 2011 00:14:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 84FA21337999 for ; Mon, 3 Jan 2011 20:14:49 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 971D527; Mon, 3 Jan 2011 19:14:49 -0500 (EST) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cB7nim9dnRlo; Mon, 3 Jan 2011 19:14:49 -0500 (EST) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id C296619; Mon, 3 Jan 2011 19:14:48 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 88EA4AE6C1; Tue, 4 Jan 2011 08:14:47 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p3yvR4TG1sxg; Tue, 4 Jan 2011 08:14:42 +0800 (WST) Received: from [10.1.1.2] (124-168-182-57.dyn.iinet.net.au [124.168.182.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id E074DAE392; Tue, 4 Jan 2011 08:14:28 +0800 (WST) Message-ID: <4D226652.9040507@postnewspapers.com.au> Date: Tue, 04 Jan 2011 11:14:10 +1100 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: Albretch Mueller CC: pgsql-jdbc@postgresql.org Subject: Re: making postgresql "source" its data feed from external csv file ... References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/5 X-Sequence-Number: 21337 On 01/04/2011 09:55 AM, Albretch Mueller wrote: > As I understand postgresql "COPY FROM" does in effect copy the data > to the DBMS, but what I need is for the DBMS to "source" its data feed > with the outer file and synchronize it as it changes without having to > run "COPY TO". Is this possible? This way I can keep the data in a way > that I can try on any DBMS No, that's not currently possible. What you describe is covered by SQL/MED. There's ongoing work to implement SQL/MED for 9.1 / 9.2, but there is no support for it in any current release version of PostgreSQL. SQL/MED is intended for a lot more than just accessing flat files, but should be capable of that. There's a reason relational databases don't store their backing data as CSV files - because they're *SLOW* to work with, in particular to update. You can expect horribly slow write performance with any scheme like this even if you do get it working. -- Craig Ringer