Re: [BUGS] psql's \copy incompatible with :variables

2011-10-14 Thread Bruce Momjian
Josh Berkus wrote: > > > \copy is different because it uses OT_WHOLE_LINE mode to read the > > argument, and that doesn't expand :variable references. I'd be a bit > > leery of changing that. > > So, doc warning then? I don't think enough people have hit this problem to warrant that. -- Bru

Re: [BUGS] psql's \copy incompatible with :variables

2011-10-14 Thread Josh Berkus
> \copy is different because it uses OT_WHOLE_LINE mode to read the > argument, and that doesn't expand :variable references. I'd be a bit > leery of changing that. So, doc warning then? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-bugs mailing list (pgsql-bu

Re: [BUGS] psql's \copy incompatible with :variables

2011-10-13 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Josh Berkus wrote: > >> Note that psql variables work perfectly fine with COPY. It's just \copy > >> which seems to be misbehaving. > > > The problem is that none of the backslash commands interpret variables: > > Nonsense. > > regression=# \set foo

Re: [BUGS] psql's \copy incompatible with :variables

2011-10-13 Thread Tom Lane
Bruce Momjian writes: > Josh Berkus wrote: >> Note that psql variables work perfectly fine with COPY. It's just \copy >> which seems to be misbehaving. > The problem is that none of the backslash commands interpret variables: Nonsense. regression=# \set foo bar regression=# \d foo Did not find

Re: [BUGS] psql's \copy incompatible with :variables

2011-10-13 Thread Bruce Momjian
Josh Berkus wrote: > Summary: \copy interprets psql's :variables as literal strings > > Tested On: 8.4.4, 9.0.4 > > Severity: Annoyance > > Steps to Reproduce: > > psql > > \set filename 'test.csv' > > \copy pg_class to :filename with csv > > \q > > ls > >