Re: database files

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Gail Zacharias" <gz(at)clozure(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: database files
Date: 2003-10-22 21:05:53
Message-ID: D90A5A6C612A39408103E6ECDD77B8294CE271@voyager.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: Gail Zacharias [mailto:gz(at)clozure(dot)com]
> Sent: Wednesday, October 22, 2003 12:42 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] database files
>
>
> I am investigating the possibility of using pgsql as the
> database in an application. I have some unusual requirements
> that I'd like to ask you all about. I apologize in advance
> if my terminology is a little "off", I'm not familiar with
> pgsql (yet).
>
> I need to be able to move the database files, as normal
> user-visible files, between machines. I.e. given a database
> on machine A, I want to be able to copy either a single file
> (ideally) or a single directory (less ideal but still ok) to,
> say, a zip drive, bring it over to another machine (with
> pgsql also installed), start up my application and have it
> access the copied database through pgsql.
>
> Is this sort of thing possible? Is a database stored in a
> single file or multiple files? Can the location of the
> file(s) be controlled? Are the files accessible and
> consistent while pgsql is running? I assume not all the time,
> but is there a reliable way to make them accessible (i.e.
> copyable) and consistent short of shutting down pgsql?
>
> Is the file format of the pgsql database files compatible
> between OS's? E.g. could I take some database files from
> Linux and use them on Windows?

The generic way to accomplish what you want is with the COPY command.
http://developer.postgresql.org/docs/postgres/sql-copy.html

Browse pgsql-general by date

  From Date Subject
Next Message Josué Maldonado 2003-10-22 21:29:56 Indexes and querys
Previous Message Oksana Yasynska 2003-10-22 19:59:05 Re: plpgsql: return multiple result sets or temp table