Обсуждение: Database information
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 ------------------------------------------------------------
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
/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