From: Gourish Singbal <gourish@gmail.com>
To: E.Karystinakis@bradford.ac.uk <E.Karystinakis@bradford.ac.uk>
Cc: pgsql-admin@postgresql.org
Subject: Re: Database information
Date: Wed, 1 Mar 2006 14:45:22 +0530
Message-ID: <674d1f8a0603010115h79866cc8vcb5982065cd91ba5@mail.gmail.com> (raw)
In-Reply-To: <1141056432.440323b0c89b7@webmail6.brad.ac.uk>
References: <1141056432.440323b0c89b7@webmail6.brad.ac.uk>
Use the pg_dump utility in postgresql.
1. to export the database data use .
/usr/local/pgsql/bin/pg_dump [database_name] > filename.dat
2. to export only the schema of the database .
/usr/local/pgsql/bin/pg_dump -s [database_name] > schema_filename.sql
NOTE:
/usr/local/pgsql/bin/pg_dump --help
is ur friend.
On 2/27/06, E.Karystinakis@bradford.ac.uk <E.Karystinakis@bradford.ac.uk>
wrote:
>
> Hello,
>
> I am a student at the university of Bradfordat the department of
> Computing. In
> the labs we use postgeSQL. If it is possible can you please inform me how
> I can
> create .dat files with the information of the tables of the existing
> database
> and a .sql file which will have the tables that are created? I would
> appreciate
> your help.
>
> Thank you in advance,
>
> Karystinakis Evangelos
>
>
> ------------------------------------------------------------
> This mail sent through IMP: http://webmail.brad.ac.uk
> To report misuse from this email address forward the message
> and full headers to misuse@bradford.ac.uk
> ------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
--
Best,
Gourish Singbal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gourish@gmail.com, E.Karystinakis@bradford.ac.uk
Subject: Re: Database information
In-Reply-To: <674d1f8a0603010115h79866cc8vcb5982065cd91ba5@mail.gmail.com>
References: <1141056432.440323b0c89b7@webmail6.brad.ac.uk> <674d1f8a0603010115h79866cc8vcb5982065cd91ba5@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox