Re: Automate copy - Postgres 9.2 - Mailing list pgsql-general

From David G. Johnston
Subject Re: Automate copy - Postgres 9.2
Date
Msg-id CAKFQuwYmEaoYT0FCnqMwgxA_3N-7B=v0UowzokJdFckgO7xa1w@mail.gmail.com
Whole thread Raw
In response to Re: Automate copy - Postgres 9.2  (Patrick B <patrickbakerbr@gmail.com>)
Responses Re: Automate copy - Postgres 9.2
List pgsql-general

POn Wednesday, June 8, 2016, Patrick B <patrickbakerbr@gmail.com> 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. 

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Automate copy - Postgres 9.2
Next
From: John R Pierce
Date:
Subject: Re: Automate copy - Postgres 9.2