Re: [HACKERS] Insert result does not match record count

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Natalie Wenz <nataliewenz(at)ebureau(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Insert result does not match record count
Date: 2014-01-31 19:11:12
Message-ID: 20140131191112.GN19957@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Jan 31, 2014 at 06:34:27PM +0100, Vik Fearing wrote:
> >> Application code that relies on the values already has problems though
> >> since the returned values are pretty bogus now. Including the fact that
> >> it can return 0 as the number of modified rows which is checked for more
> >> frequently than the actual number IME...
> >> So I think client code that uses simplistic stuff like atoi isn't worse
> >> off afterwards since the values will be about as bogus. I am more
> >> worried about code that does range checks like java's string conversion
> >> routines...
> >>
> >> I think fixing this for 9.4 is fine, but due to the compat issues I
> >> think it's to late for 9.3.
> > Where are we on this? There was a posted patch, attached, but Vik
> > Fearing said it was insufficent and he was working on a new one:
> >
> > http://www.postgresql.org/message-id/51EFF67A.7020509@dalibo.com
> >
>
> Unfortunately, I gave up on it as being over my head when I noticed I
> was changing the protocol itself. I should have notified the list so
> someone else could have taken over.

OK, so that brings up a good question. Can we change the protocol for
this without causing major breakage? Tom seems to indicate that it can
be done for 9.4, but I thought protocol breakage was a major issue. Are
we really changing the wire protocol here, or just the type of string we
can pass back to the interface?

I know the libpq API we give to clients is a string so it is OK.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2014-01-31 19:22:38 Re: postgres FDW cost estimation options unrecognized in 9.3-beta1
Previous Message Alvaro Herrera 2014-01-31 18:15:28 Re: Large objects and savepoints - Snapshot reference leak

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-01-31 19:11:23 Re: Add min and max execute statement time in pg_stat_statement
Previous Message Bruce Momjian 2014-01-31 18:38:01 Re: pgindent wishlist item