Re: database files - Mailing list pgsql-general

From Dann Corbit
Subject Re: database files
Date
Msg-id D90A5A6C612A39408103E6ECDD77B8294CE271@voyager.corporate.connx.com
Whole thread Raw
In response to database files  (Gail Zacharias <gz@clozure.com>)
List pgsql-general
> -----Original Message-----
> From: Gail Zacharias [mailto:gz@clozure.com]
> Sent: Wednesday, October 22, 2003 12:42 PM
> To: pgsql-general@postgresql.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

pgsql-general by date:

Previous
From: Gail Zacharias
Date:
Subject: database files
Next
From: Josué Maldonado
Date:
Subject: Indexes and querys