Re: Deleting From View?
От | Andreas Kretschmer |
---|---|
Тема | Re: Deleting From View? |
Дата | |
Msg-id | 20070105155108.GA22220@KanotixBox обсуждение исходный текст |
Ответ на | Re: Deleting From View? ("Jeanna Geier" <jgeier@apt-cafm.com>) |
Список | pgsql-general |
Jeanna Geier <jgeier@apt-cafm.com> 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°
В списке pgsql-general по дате отправления: