Search Postgresql Archives

Re: redirecting query statement and output to a marked up file, using psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wim Bertels wrote:
> 
> --user2
> SET SESSION AUTHORIZATION user2;
> \pset format latex
> \echo ECHO queries
> \o report/test_user2.tex
> \i structure/test_user2.sql
> "
> 
> This doenst seem to work,
> as the ECHO queries output isnt written to the file (test_user2.tex)

Actions are performed as they are encountered so put the \echo *after* the
\o, like this:

   SET SESSION AUTHORIZATION user2;
   \pset format latex
   \o report/test_user2.tex
   \echo ECHO queries
   \i structure/test_user2.sql

HTH,
Bosco.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux