Re: Automate copy - Postgres 9.2

Поиск
Список
Период
Сортировка
Искать
От
rob stone
Тема
Re: Automate copy - Postgres 9.2
Дата
Msg-id
1465499725.7425.3.camel@gmail.com
Ответ на
Список
Дерево обсуждения
Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 Adrian Klaver <adrian.klaver@aklaver.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 John R Pierce <pierce@hogranch.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 John R Pierce <pierce@hogranch.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 Rob Sargent <robjsargent@gmail.com>
Re: Automate copy - Postgres 9.2 John R Pierce <pierce@hogranch.com>
Re: Automate copy - Postgres 9.2 John R Pierce <pierce@hogranch.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 "David G. Johnston" <david.g.johnston@gmail.com>
Re: Automate copy - Postgres 9.2 rob stone <floriparob@gmail.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 Adrian Klaver <adrian.klaver@aklaver.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
Re: Automate copy - Postgres 9.2 rob stone <floriparob@gmail.com>
Re: Automate copy - Postgres 9.2 Melvin Davidson <melvin6925@gmail.com>
Re: Automate copy - Postgres 9.2 Patrick B <patrickbakerbr@gmail.com>
On Wed, 2016-06-08 at 23:50 -0400, David G. Johnston wrote:
> 
> POn Wednesday, June 8, 2016, Patrick B 
> wrote:
> > > ERROR:  syntax error at or near "||"
> > > LINE 12:     TO '/var/lib/pgsql/' || crtrow.account_id |...
> > 
> 
> Which tells me you cannot use an expression as a file name.  The docs
> support this conclusion.
> 
> You probably need to use EXECUTE after constricting a string.
> 
> You could also try psql in a shell script.
> 
> David J. 


If this is something that you'll never ever have to do again in the
future, you could download ExecuteQuery which has a function to export
a result set as either XML or CSV delimited file output.

OTOH, if this is going to be something run on a regular basis, I think
you'd be better off writing a little program, or as David suggested
embedding this into a shell script.

HTH,
Rob

В списке pgsql-general по дате отправления
От: Bryan Henderson
Дата:
От: Alex Magnum
Дата:
FAQ