From: | Jan Wieck <janwieck(at)yahoo(dot)com> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Alan Dorman <mdorman(at)debian(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Queries using rules show no rows modified? |
Date: | 2002-05-10 10:29:15 |
Message-ID: | 200205101029.g4AATFp03440@saturn.janwieck.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hiroshi Inoue wrote:
> Tom Lane wrote:
> >
> > Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > > Of cource it is nice to have a complete solution
> > > immediately but it doesn't seem easy. My patch is
> > > only a makeshift solution but fixes the most
> > > siginificant case(typical updatable views).
> >
> > I would like to devise a complete solution *before* we consider
> > installing makeshift solutions (which will institutionalize wrong
> > behavior).
> >
> > There seems to be some feeling here that in the presence of rewrites
> > you only want to know that "something happened". Are you suggesting
> > that the returned tuple count should be the sum of all counts from
> > insert, update, and delete actions that happened as a result of the
> > query? We could certainly implement that, but it does not seem like
> > a good idea to me.
>
> What should the backends return for complicated rewrites ?
> And how should/could clients handle the results ?
> It doesn't seem easy to me and it seems a flaw of rule
> system. Honestly I don't think that the psqlodbc driver
> can guarantee to handle such cases properly.
> However both Ron's case and Michael's one are ordinary
> updatable views. If we can't handle the case properly,
> we could never recommend users to use (updatable) views.
The fact that our rule system is that powerful that you can
have multi-action rules is a flaw ... awe.
Do you think that if a trigger suppresses your original
insert, but instead does 2 inserts somewhere else and another
update and delete here and there, then 0 is the correct
answer to the client? Well, that's what happens now, so it
should irritate your client in exactly the same way. So not
only our rule system, but our trigger system has a flaw too.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Manfred Koizar | 2002-05-10 11:12:21 | Nested transactions RFC |
Previous Message | Enke, Michael | 2002-05-10 10:27:45 | Re: Bug #659: lower()/upper() bug on ->multibyte<- DB |