Re: postgres external table

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Amy Smith <vah123(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgres external table
Date: 2010-01-18 15:43:16
Message-ID: dcc563d11001180743m25c41946n9fa24b52f6717448@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 18, 2010 at 7:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Greg Smith <greg(at)2ndquadrant(dot)com> writes:
>> Craig Ringer wrote:
>>> For those non-Oracle users among us, what's an external table?
>
>> External tables let you map a text file directly to a table without
>> explicitly loading it.  In PostgreSQL, if you have data in a CSV file,
>> usually you'd import it with COPY before you'd use it.  If external
>> tables were available, you'd just say there's an external table as a CSV
>> file and you could start running queries against it.
>
> I'm finding it hard to visualize a use-case for that.  We must postulate
> that the table is so big that you don't want to import it, and yet you
> don't feel a need to have any index on it.  Which among other things
> implies that every query will seqscan the whole table.  Where's the
> savings?

I've used it mostly for importing in the past. Saves the step of
loading a large file into a table with no constraints as a middle
step.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2010-01-18 16:48:13 Re: postgres external table
Previous Message Martin Flahault 2010-01-18 15:34:10 Re: Collate order on Mac OS X, text with diacritics in UTF-8