Re: external table - Mailing list pgsql-novice

From Albe Laurenz
Subject Re: external table
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17D16E3B@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to external table  ("John R. Sowden" <jsowden@americansentry.net>)
Responses Re: external table  ("John R. Sowden" <jsowden@americansentry.net>)
List pgsql-novice
John R. Sowden wrote:
> I am currently writing my own database apps in foxpro/dos (since 1980).
>   pg seems to be a good way to move on, but I see a couple of problems.
> 
> All of the application programs seem to be c based.  Learning c for
> business apps is a problem.

Why do you have to learn C to use a program that is written in C?
Or do I misunderstand you?

> Currently I use a lookup database for many kinds of applications that I
> create for my company.  It seems that the sql database arrangement is to
> have 1 database with multiple related tables inside.  I do not want to
> have to keep current multiple look-up tables (cities, counties, police
> depts, their phone numbers, etc.) in separate databases.  Can I use, say
> a database with billing tables (transacions, etc.) and refer to an
> external lookup table?  I might store a "G" in the city field, which
> would refer to "San Francisco", etc.

What is the problem with keeping the lookup table in the database?

There is a foreign data wrapper (file_fdw) included with PostgreSQL
as a "contrib module" that will allow to use a flat OS file like a table.
If you modify the file while PostgreSQL uses it, bad things are likely to happen.
If the file doesn't change, I would definitely COPY it into a table.

Yours,
Laurenz Albe

pgsql-novice by date:

Previous
From: "John R. Sowden"
Date:
Subject: external table
Next
From: "John R. Sowden"
Date:
Subject: Re: external table