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

Re: COPY TO looses on view

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Steve Pothier <pothiers(at)aries(dot)tucson(dot)saic(dot)com>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-bugs(at)postgresql(dot)org
Subject: Re: COPY TO looses on view
Date: 2001-07-11 21:53:41
Message-ID: 200107112153.f6BLrfI26497@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
> 
> Thank _you_.
> 
> I didn't see anything in the documentation under COPY TO that
> indicated it should not work with views.  Since you say it should
> raise and error, the documentation should probably be updated too.
> 
> -Steve Pothier-
> 
>    Date: Thu, 28 Jun 2001 10:56:29 -0400
>    From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>    Cc: pgsql-bugs(at)postgresql(dot)org
> 
>    Steve Pothier <pothiers(at)aries(dot)tucson(dot)saic(dot)com> writes:
>    > 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).
> 
>    It should raise an error.  Thanks for pointing that out.

OK, the following patch throws an error if you try to COPY TO/FROM
views.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-bugs by date

Next:From: Joel G GuevaraDate: 2001-07-11 23:08:51
Subject: bug report: tuple is too big
Previous:From: Oyvind HallsteinsenDate: 2001-07-11 18:40:32
Subject: Re: Compilation on Solaris 2.8

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