Search Postgresql Archives

Re: Deleting From View?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeanna Geier <jgeier@xxxxxxxxxxxx> schrieb:

> 
> Hello List!
> 
> I'm having an issue with my program; it's inserting into one record into a
> view (named 'measurement') twice ,which it's not supposed to be - so, I'm

You can't insert data into a view. My guess: you have a RULE for this
VIEW to handle INSERTs.


> attempting to put a delete statement in the code to remove one of these
> records, but am getting an error.  (Will track down the real insert issue
> ...
> And when I run my program I get an exception: cannot delete from a view.
> 
> Is there anyway I can do this in my code?

You need a RULE for DELETE, too. Take a look at
http://www.postgresql.org/docs/8.1/interactive/rules-update.html


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux