Re: Automate copy - Postgres 9.2

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Patrick B <patrickbakerbr(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Automate copy - Postgres 9.2
Date: 2016-06-09 03:50:56
Message-ID: CAKFQuwYmEaoYT0FCnqMwgxA_3N-7B=v0UowzokJdFckgO7xa1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

POn Wednesday, June 8, 2016, Patrick B <patrickbakerbr(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2016-06-09 04:50:23 Re: Automate copy - Postgres 9.2
Previous Message Rob Sargent 2016-06-09 03:05:22 Re: Automate copy - Postgres 9.2