Re: [BUGS] BUG #14493: psql command : Unable to use set with \copy - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14493: psql command : Unable to use set with \copy
Date
Msg-id 17199.1484234801@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] BUG #14493: psql command : Unable to use set with \copy  (maxandreogeret@gmail.com)
List pgsql-bugs
maxandreogeret@gmail.com writes:
> When launching a .sql file from batch script with psql command you can't
> pass a variable with set.

I think the actual issue here has nothing to do with batch files;
rather the problem is that \copy doesn't expand potential variable
references in its arguments.  I'm not sure about the compatibility
implications of changing that.  In the meantime, perhaps you could
use COPY instead of \copy.

            regards, tom lane


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

pgsql-bugs by date:

Previous
From: maxandreogeret@gmail.com
Date:
Subject: [BUGS] BUG #14493: psql command : Unable to use set with \copy
Next
From: Ragnar Ouchterlony
Date:
Subject: Re: [BUGS] Problem with declarative partitioning and COPY FROM