COPY TO looses on view - Mailing list pgsql-bugs

From Steve Pothier
Subject COPY TO looses on view
Date
Msg-id 200106271546.f5RFkAO22074@payson.tucson.saic.com
Whole thread Raw
Responses Re: COPY TO looses on view
List pgsql-bugs
I created a simple view from an existing table.  I can select on the
view ok but COPY TO "does nothing" (no error, no output).

I did this under:
   psql (PostgreSQL) 7.1
   Linux payson 2.2.16 #1 Thu Oct 5 01:30:41 GMT 2000 ppc unknown
     &
   Linux mallard 2.4.0-4GB #1 Wed Jan 24 15:55:09 GMT 2001 i686 unknown


This is a "Minor Annoyance" since there is a work around (by creating
a temp table from the view; see below).

Thank you for your care and feeding of PostgreSQL!

-sp-

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hbase=> create view foo as select * from subject;
hbase=> CREATE

hbase=> select count(*) from subject;
hbase=>  count
-------
  1372
(1 row)


hbase=> copy foo to stdout
hbase-> ;
hbase=> copy foo to stdout;
hbase=> copy subject to stdout;
00001       \N    \N    \N    \N
00002       \N    \N    \N    \N
...
04054       \N    \N    M    \N
hbase=> select count(*) from foo;
hbase=>  count
-------
  1372
(1 row)

hbase=> CREATE TEMP TABLE snafu AS SELECT * from foo;
hbase=> SELECT

hbase=> select count(*) from snafu;
hbase=>  count
-------
  1372
(1 row)


hbase=> copy snafu to stdout
hbase-> ;
00001       \N    \N    \N    \N
00002       \N    \N    \N    \N
...
04054       \N    \N    M    \N

pgsql-bugs by date:

Previous
From: "Lotus Luby-Loo"
Date:
Subject: Strange security behaviour!
Next
From: "Lotus Luby-Loo"
Date:
Subject: ...