Re: [GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-04 Thread Michael Trausch
deepak pal wrote:
 hi
   i am trying to make script file for my database by using pg_dump in
 windows as u say i open psql to postgres  then a prompt postgres# open
 then i write \i pg_dump it shows error.what should i do...plz hepl
  

\i in psql is for including a file to be read and parsed by the database
server.  Surely, this is not what you are after.

Since you have not specified the version of PostgreSQL that you're
using, I'm going to take the liberty of assuming that you're using 8.1.

http://www.postgresql.org/docs/8.1/interactive/backup.html

That portion of the manual should address your needs with regards to
using pg_dump and other utilities.  It is the Backup/Restore chapter of
the manual.

- Mike

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-03 Thread deepak pal
hi 
 i am trying to make script file for my database by using pg_dump in windows as u say i open psqlto postgres then a prompt postgres# open then i write \i pg_dump it shows error.what should i do...plz hepl 



Re: [GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-03 Thread A. Kretschmer
am  03.04.2006, um 17:20:56 +0530 mailte deepak pal folgendes:
 hi
   i am trying to make script file for my database by using pg_dump in

If you want to write your own scriptfiles, you should better use a
editor for this.


 windows as u say i open psql to postgres  then a prompt postgres# open then
 i write \i pg_dump it shows error.what should i do...plz hepl

No. You should type \i your_script, and replace your_script with the
filename (and maybe the path to this file).


HTH, Andreas
-- 
Andreas Kretschmer(Kontakt: siehe Header)
Heynitz:  035242/47215,  D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===Schollglas Unternehmensgruppe=== 

---(end of broadcast)---
TIP 6: explain analyze is your friend


Fwd: [GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-03 Thread Tomi NA
-- Forwarded message --From: deepak pal [EMAIL PROTECTED]Date: Apr 3, 2006 2:05 PM
Subject: Re: [GENERAL] how to create script of database in postgres..sql(winxp)To: Tomi NA [EMAIL PROTECTED]it do not recognize that \i and pg_dump i use \i pg_dump mydbnamenewdb command
From the examples in man pg_dump: To dump a database: $ pg_dump mydb  db.out To reload this database:
 $ psql -d database -f db.out To dump a database called mydb to a tar file: $ pg_dump -Ft mydb  db.tar To reload this dump into an existing database called newdb:
 $ pg_restore -d newdb db.tarHave you tried to dump the database this way? Does it work?t.n.a.


Re: [GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-03 Thread Robert Treat
On Monday 03 April 2006 07:50, deepak pal wrote:
 hi
   i am trying to make script file for my database by using pg_dump in
 windows as u say i open psql to postgres  then a prompt postgres# open then
 i write \i pg_dump it shows error.what should i do...plz hepl

you need to use the pg_dump program, which is a seperate program from psql. 
IIRC it is in your start menu, but if not you will need to access it from a 
command line window. 
-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 6: explain analyze is your friend