Running a file

Поиск
Список
Период
Сортировка
Искать

Running a file

От:
Thomas SMETS <tsmets@altern.org>
Дата:



I'm runnin postgres 7.?? (Last RPM package available from the site).

I want to create a few DB creation scripts so I can "publish" that
afterwards.
On Oracle there's a such possibility but I haven't seen anything
comaprable in the docs ... 
I however think I'm missing one of the very first possibility of
"pgsql".
Could someone point me were I could find some more infos on that matter
?

Tx,

Thomas,

p.s. : 
Merry Xmas for some / Enjoy Ead / Merry Solstice for the others :-)



-- 
Sun Dec 24 13:32:35 CET 2000

Thomas SMETS                        e-mail : tsmets@altern.org
Av. de la Brabançonne 133 / 3       Tel. : +32 (0)2 742. 05. 94.
1030 Bruxelles
======= Quote of the Day =========
The FALAFEL SANDWICH lands on my HEAD and I become a VEGETARIAN ...
========= End of Quote ===========

Re: Running a file

От:
"Anthony E . Greene" <agreene@pobox.com>
Дата:
On Sun, 24 Dec 2000 08:18:50 Thomas SMETS wrote:
>I'm runnin postgres 7.?? (Last RPM package available from the site).
>
>I want to create a few DB creation scripts so I can "publish" that
>afterwards.
>On Oracle there's a such possibility but I haven't seen anything
>comaprable in the docs ... 

man pg_dump

-- 
Anthony E. Greene  
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
Chat:  AOL/Yahoo: TonyG05    ICQ: 91183266
Linux. The choice of a GNU Generation. 

Running a file

От:
Raju Mathur <raju@linux-delhi.org>
Дата:
Hi Thomas,

Is it possible you're looking for:

   psql -f script.sql 

?

Regards,

-- Raju

>>>>> "Thomas" == Thomas SMETS  writes:

    Thomas> I'm runnin postgres 7.?? (Last RPM package available from
    Thomas> the site).

    Thomas> I want to create a few DB creation scripts so I can
    Thomas> "publish" that afterwards.  On Oracle there's a such
    Thomas> possibility but I haven't seen anything comaprable in the
    Thomas> docs ...  I however think I'm missing one of the very
    Thomas> first possibility of "pgsql".  Could someone point me were
    Thomas> I could find some more infos on that matter ?

    Thomas> Tx,

    Thomas> Thomas,

    Thomas> p.s. : Merry Xmas for some / Enjoy Ead / Merry Solstice
    Thomas> for the others :-)
-- 
Raju Mathur          raju@kandalaya.org           http://kandalaya.org/

Re: [SQL] Running a file

От:
"Brett W. McCoy" <bmccoy@chapelperilous.net>
Дата:
On Sun, 24 Dec 2000, Thomas SMETS wrote:

> I'm runnin postgres 7.?? (Last RPM package available from the site).
>
> I want to create a few DB creation scripts so I can "publish" that
> afterwards.
> On Oracle there's a such possibility but I haven't seen anything
> comaprable in the docs ...
> I however think I'm missing one of the very first possibility of
> "pgsql".
> Could someone point me were I could find some more infos on that matter
> ?

Are you talking about writing external scripts and importing them into
Postgres in a manner similar to the @ function in SQL*Plus?  In psql, you
can use \i to import scripts to do that.

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Reading is to the mind what exercise is to the body.

Re: [SQL] Running a file

От:
Thomas SMETS <tsmets@altern.org>
Дата:

Yep,

Tx,

Thomas,

p.s. Sorry for the stupid question 








Raju Mathur wrote:
> 
> Hi Thomas,
> 
> Is it possible you're looking for:
> 
>    psql -f script.sql 
> 
> ?
> 
> Regards,
> 
> -- Raju
> 
> >>>>> "Thomas" == Thomas SMETS  writes:
> 
>     Thomas> I'm runnin postgres 7.?? (Last RPM package available from
>     Thomas> the site).
> 
>     Thomas> I want to create a few DB creation scripts so I can
>     Thomas> "publish" that afterwards.  On Oracle there's a such
>     Thomas> possibility but I haven't seen anything comaprable in the
>     Thomas> docs ...  I however think I'm missing one of the very
>     Thomas> first possibility of "pgsql".  Could someone point me were
>     Thomas> I could find some more infos on that matter ?
> 
>     Thomas> Tx,
> 
>     Thomas> Thomas,
> 
>     Thomas> p.s. : Merry Xmas for some / Enjoy Ead / Merry Solstice
>     Thomas> for the others :-)
> --
> Raju Mathur          raju@kandalaya.org           http://kandalaya.org/

-- 
Sat Dec 30 00:39:50 CET 2000

Thomas SMETS                        e-mail : tsmets@altern.org
Av. de la Brabançonne 133 / 3       Tel. : +32 (0)2 742. 05. 94.
1030 Bruxelles
======= Quote of the Day =========
Ye've also got to remember that ... respectable people do the most
astonishin'
things to preserve their respectability.  Thank God I'm not respectable.
		-- Ruthven Campbell Todd
========= End of Quote ===========

Re: [SQL] Running a file

От:
Kaare Rasmussen <kar@webline.dk>
Дата:
> Are you talking about writing external scripts and importing them into
> Postgres in a manner similar to the @ function in SQL*Plus?  In psql, you
> can use \i to import scripts to do that.

If it's to be used in shell scripts, it's just as easy to pipe:

psql dbname
FAQ