From sureshb@warpera.com Mon Sep 22 15:54:24 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id EABF0D1B4EE for ; Mon, 22 Sep 2003 15:54:24 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 53246-01 for ; Mon, 22 Sep 2003 12:53:54 -0300 (ADT) Received: from localhost.localdomain (mail.warpera.com [209.237.14.29]) by svr1.postgresql.org (Postfix) with ESMTP id DB7FFD1B4EA for ; Mon, 22 Sep 2003 12:53:52 -0300 (ADT) From: "Suresh Basandra" To: Subject: Using sql statements in file Date: Mon, 22 Sep 2003 08:54:11 -0700 Message-ID: <000001c38121$c3c1fcc0$7e01a8c0@adminsyiqnhet0> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C380E7.176324C0" X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_80_90 X-Spam-Level: X-Archive-Number: 200309/258 X-Sequence-Number: 15236 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C380E7.176324C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I would like to do the following using files: 1. put create database, create tables sql statements in a file and execute through prompt 2. insert or update data that is put in a file Please let me know if there are any examples that lists how sql statements can be put in a file and used. Thanks Suresh Basandra ------=_NextPart_000_0001_01C380E7.176324C0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I would like to do the following using files:=

 

1. put create database, create tables sql statements in a file and execute through prompt

2. insert or update data that= is put in a file

 

Please let me know if there are any examples that lists = how sql statements can be =  put in a file and used.

 

Thanks

Suresh Basandra

------=_NextPart_000_0001_01C380E7.176324C0-- From sureshb@warpera.com Mon Sep 22 16:01:58 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5FA74D1C9F2 for ; Mon, 22 Sep 2003 16:01:58 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 53619-06 for ; Mon, 22 Sep 2003 13:01:26 -0300 (ADT) Received: from localhost.localdomain (mail.warpera.com [209.237.14.29]) by svr1.postgresql.org (Postfix) with ESMTP id 672C8D1C9EC for ; Mon, 22 Sep 2003 13:01:25 -0300 (ADT) From: "Suresh Basandra" To: Subject: Using sql statements in file Date: Mon, 22 Sep 2003 09:01:49 -0700 Message-ID: <000a01c38122$d49b8920$7e01a8c0@adminsyiqnhet0> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01C380E8.283CB120" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/256 X-Sequence-Number: 15234 This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C380E8.283CB120 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I would like to do the following using files: 1. put create database, create tables sql statements in a file and execute through prompt 2. insert or update data that is put in a file Please let me know if there are any examples that lists how sql statements can be put in a file and used. Thanks Suresh Basandra ------=_NextPart_000_000B_01C380E8.283CB120 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I would like to do the following using files:=

 

1. put create database, create tables sql statements in a file and execute through prompt

2. insert or update data that= is put in a file

 

Please let me know if there are any examples that lists = how sql statements can be  put in a file and used.

 

Thanks

Suresh Basandra

------=_NextPart_000_000B_01C380E8.283CB120-- From wweng@kencast.com Mon Sep 22 16:08:40 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6EFE3D1C9F1 for ; Mon, 22 Sep 2003 16:08:40 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 56137-01 for ; Mon, 22 Sep 2003 13:08:30 -0300 (ADT) Received: from mta3.snet.net (mta3.snet.net [204.60.203.69]) by svr1.postgresql.org (Postfix) with ESMTP id 28BFAD1C9F9 for ; Mon, 22 Sep 2003 13:08:29 -0300 (ADT) Received: from [192.168.1.203] (167.95.252.64.snet.net [64.252.95.167]) by mta3.snet.net (8.12.3/8.12.3/SNET-smtp-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id h8MG8Ntp016677; Mon, 22 Sep 2003 12:08:24 -0400 (EDT) Date: Mon, 22 Sep 2003 12:03:30 -0400 (EDT) From: Wei Weng X-X-Sender: wweng@localhost.localdomain To: Suresh Basandra Cc: pgsql-sql@postgresql.org Subject: Re: Using sql statements in file In-Reply-To: <000a01c38122$d49b8920$7e01a8c0@adminsyiqnhet0> Message-ID: References: <000a01c38122$d49b8920$7e01a8c0@adminsyiqnhet0> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/257 X-Sequence-Number: 15235 try psql -f filename On Mon, 22 Sep 2003, Suresh Basandra wrote: > Hi, > > I would like to do the following using files: > > 1. put create database, create tables sql statements in a file and > execute through prompt > 2. insert or update data that is put in a file > > Please let me know if there are any examples that lists how sql > statements can be put in a file and used. > > Thanks > Suresh Basandra > From bhuvan@symonds.net Tue Sep 23 05:14:29 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 20238D1B56B for ; Tue, 23 Sep 2003 05:14:29 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 55934-05 for ; Tue, 23 Sep 2003 02:13:58 -0300 (ADT) Received: from Gateway.bksys.co.in (unknown [61.3.64.17]) by svr1.postgresql.org (Postfix) with ESMTP id 430F9D1B557 for ; Tue, 23 Sep 2003 02:13:55 -0300 (ADT) Received: from bksys.co.in (mail.bksys.co.in [192.168.1.1]) by Gateway.bksys.co.in (8.11.6/8.11.6) with ESMTP id h8N5Doc01365; Tue, 23 Sep 2003 10:43:51 +0530 Received: from Bhuvan.bksys.co.in (Bhuvan.bksys.co.in [192.168.1.71]) by bksys.co.in (8.11.6/8.8.5) with ESMTP id h8N5DoB01560; Tue, 23 Sep 2003 10:43:50 +0530 Date: Tue, 23 Sep 2003 10:52:24 +0530 (IST) From: "A.Bhuvaneswaran" X-X-Sender: bhuvan@Bhuvan.bksys.co.in To: Suresh Basandra Cc: pgsql-sql@postgresql.org Subject: Re: Using sql statements in file In-Reply-To: <000001c38121$c3c1fcc0$7e01a8c0@adminsyiqnhet0> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/268 X-Sequence-Number: 15246 > 1. put create database, create tables sql statements in a file and > execute through prompt > 2. insert or update data that is put in a file Place your commands in a file & execute them either from the prompt or from psql. Remember to create your file in the below order: 1) create database 2) connect to new database (\c) 3) create tables/views/functions ... 4) insert/update commands regards, bhuvaneswaran From scott.marlowe@ihs.com Tue Sep 23 17:05:32 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id F28E9D1B56B for ; Tue, 23 Sep 2003 17:05:32 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 20809-07 for ; Tue, 23 Sep 2003 14:05:23 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id EDE28D1B536 for ; Tue, 23 Sep 2003 14:05:21 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id h8NGxT1o000628; Tue, 23 Sep 2003 10:59:30 -0600 (MDT) Date: Tue, 23 Sep 2003 10:54:45 -0600 (MDT) From: "scott.marlowe" To: Suresh Basandra Cc: Subject: Re: Using sql statements in file In-Reply-To: <000001c38121$c3c1fcc0$7e01a8c0@adminsyiqnhet0> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/274 X-Sequence-Number: 15252 On Mon, 22 Sep 2003, Suresh Basandra wrote: > Hi, > > I would like to do the following using files: > > 1. put create database, create tables sql statements in a file and > execute through prompt > 2. insert or update data that is put in a file > > Please let me know if there are any examples that lists how sql > statements can be put in a file and used. psql dbnamehere