Skip site navigation (1) Skip section navigation (2)

psql's \copy incompatible with :variables

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: psql's \copy incompatible with :variables
Date: 2011-06-08 00:22:23
Message-ID: 4DEEC0BF.7030105@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-bugs
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

	:filename

Note that psql variables work perfectly fine with COPY.  It's just \copy
which seems to be misbehaving.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

Responses

pgsql-bugs by date

Next:From: Robert HaasDate: 2011-06-08 02:17:49
Subject: Re: BUG #6041: Unlogged table was created bad in slave node
Previous:From: The Fuzzy ChefDate: 2011-06-07 23:18:40
Subject: psql's \copy incompatible with :variables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group