Inquiry From Form [pgsql]

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

Inquiry From Form [pgsql]

От:
Chris <cschneider@xede.com>
Дата:
how can I run a SQL script from a text file from within PSQL.

Like in Oracle from SQLPlus I would use the @scriptname.sql  from the SQL prompt.  What is the syntax from PSQL?  

Thanks

Re: Inquiry From Form [pgsql]

От:
Tariq Muhammad <tmuhamma@libertyrms.com>
Дата:


On Fri, 7 Feb 2003, Chris wrote:

> how can I run a SQL script from a text file from within PSQL.
> 
> Like in Oracle from SQLPlus I would use the @scriptname.sql  from the SQL prompt.  What is the syntax from PSQL?  
> 

\i script_name.sql



     _/_/     _/_/    _/_/  Tariq Muhammad
    _/  _/  _/   _/ _/  _/  tariq@libertyrms.info
   _/   _/ _/_/_/  _/_/_/   v:416-646-3304 x 111
  _/   _/ _/   _/ _/  _/    c:416-455-0272
 _/_/_/  _/_/_/  _/  _/     p:416-381-1457
_________________________________________________
     Liberty Registry Management Services Co.


Re: Inquiry From Form [pgsql]

От:
Jonathan Bartlett <johnnyb@eskimo.com>
Дата:
\i FILENAME

If you do a \? you get a listing of all commands.

Jon

On Fri, 7 Feb 2003, Chris wrote:

> how can I run a SQL script from a text file from within PSQL.
>
> Like in Oracle from SQLPlus I would use the @scriptname.sql  from the SQL prompt.  What is the syntax from PSQL?
>
> Thanks
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

Re: Inquiry From Form [pgsql]

От:
Emmanuel Charpentier <charpent@bacbuc.dyndns.org>
Дата:
Chris wrote:
> how can I run a SQL script from a text file from within PSQL.
> 
> Like in Oracle from SQLPlus I would use the @scriptname.sql  from the SQL prompt.  What is the syntax from PSQL?  

\? would have told you that \! 

Re: Inquiry From Form [pgsql]

От:
Will Trillich <will@serensoft.com>
Дата:
On Sat, Feb 15, 2003 at 09:55:07AM +0100, Emmanuel Charpentier wrote:
> Chris wrote:
> >how can I run a SQL script from a text file from within PSQL.
> >
> >Like in Oracle from SQLPlus I would use the @scriptname.sql  from the SQL 
> >prompt.  What is the syntax from PSQL?  
> 
> \? would have told you that \! 
FAQ