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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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