From prashant@envivio.com Wed May 16 21:17:51 2001 Received: from saffron.pdx.envivio.com (mail.pdx.envivio.com [208.129.211.3]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4GLHpA19771 for ; Wed, 16 May 2001 17:17:51 -0400 (EDT) (envelope-from prashant@envivio.com) Received: from prashant (cardamon.pdx.envivio.com [10.1.1.109]) by saffron.pdx.envivio.com (8.9.3/8.9.3) with SMTP id OAA85933 for ; Wed, 16 May 2001 14:17:47 -0700 (PDT) (envelope-from prashant@envivio.com) Message-ID: <002401c0de4d$67f59650$6d01010a@prashant> Reply-To: "Prashant Sinha" From: "Prashant Sinha" To: Subject: Need Help in creating script Date: Wed, 16 May 2001 14:16:00 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0021_01C0DE12.BB861C80" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Archive-Number: 200105/76 X-Sequence-Number: 1423 This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C0DE12.BB861C80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am a new postgre user. I had used sql commands to create database and tab= les. Is it possible to create a script or installable version on existing d= atabase which I could run on any machine and it would crearte the database = with all the tables and everything. Can anyone please help me with this? Thanks in advance, -Prashant. ------=_NextPart_000_0021_01C0DE12.BB861C80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
I am a new postgre user. I had used sql co= mmands to=20 create database and tables. Is it possible to create a script or installabl= e=20 version on existing database which I could run on any machine and it would= =20 crearte the database with all the tables and everything. Can anyone please = help=20 me with this?
Thanks in advance,
-Prashant.
 
------=_NextPart_000_0021_01C0DE12.BB861C80-- From dederer@spb.cityline.ru Fri May 18 12:47:59 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f4IClxA37093 for ; Fri, 18 May 2001 08:47:59 -0400 (EDT) (envelope-from pgsql-admin-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4GMRUA42393 for ; Wed, 16 May 2001 18:27:30 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f4GM1ao83457 for pgsql-admin@postgresql.org; Wed, 16 May 2001 18:01:36 -0400 (EDT) (envelope-from news) From: Alexander Dederer X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Need Help in creating script Date: Thu, 17 May 2001 02:03:31 +0400 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 21 Message-ID: <9dutbv$2hdu$2@news.tht.net> References: <002401c0de4d$67f59650$6d01010a@prashant> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: scrappy@hub.org User-Agent: KNode/0.4 To: pgsql-admin@postgresql.org X-Archive-Number: 200105/82 X-Sequence-Number: 1429 Prashant Sinha wrote: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0021_01C0DE12.BB861C80 > Content-Type: text/plain; charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Hi, > I am a new postgre user. I had used sql commands to create database and > tab= les. Is it possible to create a script or installable version on > existing d= atabase which I could run on any machine and it would crearte > the database = with all the tables and everything. Can anyone please help > me with this? Thanks in advance, Look programm: pg_dump pg_dumpall psql From manuel@des01.sanyres.es Fri May 18 14:31:12 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f4IEVCA95642 for ; Fri, 18 May 2001 10:31:12 -0400 (EDT) (envelope-from pgsql-admin-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4HBvQA43720 for ; Thu, 17 May 2001 07:57:26 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f4HBggi93576 for pgsql-admin@postgresql.org; Thu, 17 May 2001 07:42:42 -0400 (EDT) (envelope-from news) From: manuel@des01.sanyres.es X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Need Help in creating script Date: Thu, 17 May 2001 11:42:41 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 38 Message-ID: References: <002401c0de4d$67f59650$6d01010a@prashant> <9dutbv$2hdu$2@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: scrappy@hub.org User-Agent: slrn/0.9.7.0 (Linux) To: pgsql-admin@postgresql.org X-Archive-Number: 200105/87 X-Sequence-Number: 1434 In article <9dutbv$2hdu$2@news.tht.net>, Alexander Dederer wrote: > Prashant Sinha wrote: > >> This is a multi-part message in MIME format. >> >> ------=_NextPart_000_0021_01C0DE12.BB861C80 >> Content-Type: text/plain; charset="iso-8859-1" >> Content-Transfer-Encoding: quoted-printable >> >> Hi, >> I am a new postgre user. I had used sql commands to create database and >> tab= les. Is it possible to create a script or installable version on >> existing d= atabase which I could run on any machine and it would crearte >> the database = with all the tables and everything. Can anyone please help >> me with this? Thanks in advance, > > Look programm: > pg_dump > pg_dumpall > psql > > Use pg_dump. pg_dump > createdb cat | psql -- Manuel Cano Muņoz ------------------------------ SANYRES, S.A. Director Dpto. Sistemas manuel@sanyres.com manuel@sanyres.es From olly@lfix.co.uk Thu May 17 22:03:22 2001 Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4HM3MA04223 for ; Thu, 17 May 2001 18:03:22 -0400 (EDT) (envelope-from olly@lfix.co.uk) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 150VrV-000GIM-0V; Thu, 17 May 2001 23:03:13 +0100 Received: from lfix.co.uk (olly@localhost [127.0.0.1]) by localhost (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0.Beta7-1) with ESMTP id f4HM5EAJ015058; Thu, 17 May 2001 23:05:21 +0100 Message-Id: <200105172205.f4HM5EAJ015058@linda.lfix.co.uk> X-Mailer: exmh version 2.3.1 01/18/2001 (debian 2.3.1-1) with nmh-1.0.4+dev X-URL: http://www.lfix.co.uk/oliver X-face: "xUFVDj+ZJtL_IbURmI}!~xAyPC"Mrk=MkAm&tPQnNq(FWxv49R}\>0oI8VM?O2VY+N7@F- KMLl*!h}B)u@TW|B}6 cc: pgsql-admin@postgresql.org Subject: Re: Need Help in creating script In-reply-to: Message from "Prashant Sinha" of Wed, 16 May 2001 14:16:00 PDT. <002401c0de4d$67f59650$6d01010a@prashant> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 May 2001 23:05:14 +0100 From: "Oliver Elphick" X-Archive-Number: 200105/81 X-Sequence-Number: 1428 "Prashant Sinha" wrote: >I am a new postgre user. I had used sql commands to create database and tab= >les. Is it possible to create a script or installable version on existing d= >atabase which I could run on any machine and it would crearte the database = >with all the tables and everything. Can anyone please help me with this? >Thanks in advance, A simple example: Put the database commands in a text file (precede comments with --): CREATE DATABASE junk; \connect junk -- Table "a" is adgaga axdfaxdfga hgfadsh CREATE TABLE a (f1 INT PRIMARY KEY, f2 TEXT); ...and so on... Then run the script: $ psql