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

is there a reason we can't copy from a view?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: is there a reason we can't copy from a view?
Date: 2010-09-23 20:52:36
Message-ID: 4C9BBE14.1030008@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-hackers
... other than it just got forgotten?

dolszewski=# create view meh as select * from pg_tables;
CREATE VIEW
dolszewski=# copy meh to stdout;
ERROR:  cannot copy from view "meh"
HINT:  Try the COPY (SELECT ...) TO variant.
dolszewski=# copy (select * from meh) to stdout;
pg_catalogpg_statisticpostgres\Ntff
pg_catalogpg_typepostgres\Ntff

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

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-09-23 20:59:55
Subject: Re: is there a reason we can't copy from a view?
Previous:From: Kevin GrittnerDate: 2010-09-23 20:19:32
Subject: Re: Serializable Snapshot Isolation

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