Re: Reg: SQL Query for Postgres 8.4.3

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Erik Rijkers" <er(at)xs4all(dot)nl>
Cc: "Mark Kirkwood" <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, "Srinivas Naik" <naik(dot)srinu(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reg: SQL Query for Postgres 8.4.3
Date: 2010-05-04 14:29:47
Message-ID: 4BDFE90B020000250003123A@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> I think the OP is probably running a version that doesn't include
> the Jan 7 commit, which was effectively undone by the Jan 25
> commit for CVS HEAD.

It sure looks like it.

> It looks like this was intentional based on spec behavior
> of overlay(), but should we consider maintaining the historical
> behavior instead?

I know I read through the spec (several versions of it) related to
this issue when I reviewed the patch, and if memory serves the 9.0
behavior is what the spec requires. Obviously that's a behavior
change, so it can't be back-patched. I'm inclined to think the
previous behavior was pretty marginal, and there is certainly a
workaround -- omit the third parameter rather than specifying a
negative number:

SELECT substring(B'1111000000000001' from 5);
substring
--------------
000000000001
(1 row)

SELECT substring(B'1111000000000001' from 4);
substring
---------------
1000000000001
(1 row)

We have maintained nonstandard behavior in the past for
compatibility reasons, so it's a fair question; however, I'm
inclined toward the standard on this one.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-05-04 14:32:48 Re: what is good solution for support NULL inside string_to_array function?
Previous Message Simon Riggs 2010-05-04 14:27:47 Re: max_standby_delay considered harmful