From: | Andreas Kretschmer <akretschmer(at)spamfence(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Deleting From View? |
Date: | 2007-01-05 15:51:08 |
Message-ID: | 20070105155108.GA22220@KanotixBox |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jeanna Geier <jgeier(at)apt-cafm(dot)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°
From | Date | Subject | |
---|---|---|---|
Next Message | Jeanna Geier | 2007-01-05 15:59:34 | Re: Deleting From View? |
Previous Message | Martijn van Oosterhout | 2007-01-05 15:47:21 | Re: Deleting From View? |