pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedUsing sql statements in file
5+ messages / 4 participants
[nested] [flat]
* Using sql statements in file
@ 2003-09-22 15:54 Suresh Basandra <sureshb@warpera.com>
2003-09-23 05:22 ` Re: Using sql statements in file A.Bhuvaneswaran <bhuvan@symonds.net>
2003-09-23 16:54 ` Re: Using sql statements in file scott.marlowe <scott.marlowe@ihs.com>
0 siblings, 2 replies; 5+ messages in thread
From: Suresh Basandra @ 2003-09-22 15:54 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Using sql statements in file
2003-09-22 15:54 Using sql statements in file Suresh Basandra <sureshb@warpera.com>
@ 2003-09-23 05:22 ` A.Bhuvaneswaran <bhuvan@symonds.net>
1 sibling, 0 replies; 5+ messages in thread
From: A.Bhuvaneswaran @ 2003-09-23 05:22 UTC (permalink / raw)
To: Suresh Basandra <sureshb@warpera.com>; +Cc: pgsql-sql
> 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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Using sql statements in file
2003-09-22 15:54 Using sql statements in file Suresh Basandra <sureshb@warpera.com>
@ 2003-09-23 16:54 ` scott.marlowe <scott.marlowe@ihs.com>
1 sibling, 0 replies; 5+ messages in thread
From: scott.marlowe @ 2003-09-23 16:54 UTC (permalink / raw)
To: Suresh Basandra <sureshb@warpera.com>; +Cc: pgsql-sql
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 <filename.sql
^ permalink raw reply [nested|flat] 5+ messages in thread
* Using sql statements in file
@ 2003-09-22 16:01 Suresh Basandra <sureshb@warpera.com>
2003-09-22 16:03 ` Re: Using sql statements in file Wei Weng <wweng@kencast.com>
0 siblings, 1 reply; 5+ messages in thread
From: Suresh Basandra @ 2003-09-22 16:01 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Using sql statements in file
2003-09-22 16:01 Using sql statements in file Suresh Basandra <sureshb@warpera.com>
@ 2003-09-22 16:03 ` Wei Weng <wweng@kencast.com>
0 siblings, 0 replies; 5+ messages in thread
From: Wei Weng @ 2003-09-22 16:03 UTC (permalink / raw)
To: Suresh Basandra <sureshb@warpera.com>; +Cc: pgsql-sql
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
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-09-23 16:54 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-09-22 15:54 Using sql statements in file Suresh Basandra <sureshb@warpera.com>
2003-09-23 05:22 ` A.Bhuvaneswaran <bhuvan@symonds.net>
2003-09-23 16:54 ` scott.marlowe <scott.marlowe@ihs.com>
2003-09-22 16:01 Using sql statements in file Suresh Basandra <sureshb@warpera.com>
2003-09-22 16:03 ` Wei Weng <wweng@kencast.com>
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