Importing data into views fails

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Importing data into views fails
Date: 2007-04-02 18:09:38
Message-ID: 1175537378l.20071l.1l@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I've created an INSERT rule on a view
but when I try to use the COPY command to
import data into the view it fails with.

cannot copy to view "viewname"

I can create a temporary table and COPY
into the temporary table and then
INSERT into the view by selecting
from the temporary table. But that's
sorta lame, especially because I don't
want the front-end to care whether it's
importing into a table or a view.

Does anyone have any suggestions?

Is there some reason why COPYing into
views is disallowed or is there just an
extra error check in the code that's getting
in my way? If so, would the project be
open to accepting a patch?

Thanks for the work.

Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erick Papadakis 2007-04-02 18:51:24 Re: Working between Windows and Unix
Previous Message David Fetter 2007-04-02 17:43:24 Re: Using C# to create stored procedures