commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From siom...@portosdobrasil.gov.br
Subject How to run postgreSQL script from inside of another script
Date Wed, 03 Mar 2010 14:39:10 GMT
Thanks for your feed back but \i script.sql does not work.

In fact, I have a main script that calls 3 other scripts.

Within Oracle it looks like this:

/*==============================================================*/
/* Main script mainScript.sql that will create and populate DB   
/*==============================================================*/
@createTables;
@populateTables;
@selectTableValues;

I need to know how this script would look like for PostgreSQL, since this
one does not work, resulting in error.

Any help is welcome.

Thanks

Siomara



-----Mensagem original-----
De: Daniel H A Lima [mailto:email_daniel_h@yahoo.com.br] 
Enviada em: terça-feira, 2 de março de 2010 16:31
Para: Commons Users List
Assunto: Re: running postgreSQL script

Take a look at:

http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm
http://www.postgresql.org/files/documentation/books/aw_pgsql/node143.html

--- Em ter, 2/3/10, Daniel H A Lima <email_daniel_h@yahoo.com.br> escreveu:

De: Daniel H A Lima <email_daniel_h@yahoo.com.br>
Assunto: Re: running postgreSQL script
Para: "Commons Users List" <user@commons.apache.org>
Data: Terça-feira, 2 de Março de 2010, 16:29

@script_name is a SQL Plus sintax

If you are using psql (PostgreSQL command line), you can try \i script_name



--- Em ter, 2/3/10, siomara@portosdobrasil.gov.br
<siomara@portosdobrasil.gov.br> escreveu:

De: siomara@portosdobrasil.gov.br <siomara@portosdobrasil.gov.br>
Assunto: running postgreSQL script
Para: user@commons.apache.org
Data: Terça-feira, 2 de Março de 2010, 16:13

Does anybody know how to cal a postgreSQL script from inside of another one?

With Oracle I used:

@script.sql

Does anyone know the equivalent with postgreSQL?

Thanks

Siomara



     
____________________________________________________________________________
________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


 
____________________________________________________________________________
________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message