Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 912D01337990 for ; Thu, 24 Mar 2011 13:49:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 02154-02 for ; Thu, 24 Mar 2011 16:49:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id D7E3713364DE for ; Thu, 24 Mar 2011 13:49:09 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id E099D348024; Thu, 24 Mar 2011 09:49:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aJ2F8L3mw-KU; Thu, 24 Mar 2011 09:49:06 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.20.220]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id A008D348022; Thu, 24 Mar 2011 09:49:06 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0DF206EA7B; Thu, 24 Mar 2011 13:49:02 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: Guillaume Lelarge , Selena Deckelmann , Andrew Dunstan , pgsql-students Subject: Re: foreign data wrappers From: Alvaro Herrera To: Zheng Yang In-reply-to: <4ACC318A-1B6F-49A5-9B02-49EEAF7B97C7@gmail.com> References: <690867AB-C50B-4354-91D0-8A0811639C4C@gmail.com> <4D879CD0.5030803@dunslane.net> <3EF9E4CC-CF42-4B45-86FF-4CB9D46D7442@gmail.com> <4D8AF8C2.3000007@lelarge.info> <4ACC318A-1B6F-49A5-9B02-49EEAF7B97C7@gmail.com> Date: Thu, 24 Mar 2011 13:49:02 -0300 Message-Id: <1300985156-sup-3058@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.386 tagged_above=-10 required=5 tests=BAYES_00=-1.9, URIBL_RHS_DOB=1.514 X-Spam-Level: X-Archive-Number: 201103/22 X-Sequence-Number: 163 Excerpts from Zheng Yang's message of jue mar 24 05:49:19 -0300 2011: > I am quite new to postgresql, but slowly picking up :) In general context, storing images directly inside DBMS fields as BLOBs was not considered as a good practice. > However, storing file directories or links may cause inconsistency. So I am quite interested in how this datalink concept can be implemented! I'm not really sure how different would be handling the file linking in an FDW. For example, if a transaction runs that deletes a file through the FDW, and the transaction rolls back, how are you going to restore the file to life? (It sounds like you're trying to have a FDW that would present a directory as a table, and each file in the dir as a row. Maybe it's not a bad idea but it needs a lot more thought.) -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support