alter view foo set () -- fixed in 9.2 stable, but when will it be released?

Started by Joe Van Dykover 13 years ago5 messagesgeneral
Jump to latest
#1Joe Van Dyk
joe@tanga.com

I'm running into this bug fixed a few days after 9.2.1 was released:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d2292f6405670e1fdac13998f87b4348c71fb9e6

Anyone know when 9.2.2 will go out?

Thanks,
Joe

#2Chris Angelico
rosuav@gmail.com
In reply to: Joe Van Dyk (#1)
Re: alter view foo set () -- fixed in 9.2 stable, but when will it be released?

On Sat, Nov 3, 2012 at 9:15 AM, Joe Van Dyk <joe@tanga.com> wrote:

I'm running into this bug fixed a few days after 9.2.1 was released:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d2292f6405670e1fdac13998f87b4348c71fb9e6

Anyone know when 9.2.2 will go out?

Point of random curiosity: The commit mentioned adds the following line:

if (rinfo->reloptions && strlen(rinfo->reloptions) > 0)

Is there a reason this isn't done as:

if (rinfo->reloptions && *rinfo->reloptions)

? It seems like overkill to ascertain the string length just to find
out if the first character is the null terminator.

ChrisA

#3Ondrej Ivanič
ondrej.ivanic@gmail.com
In reply to: Chris Angelico (#2)
Re: alter view foo set () -- fixed in 9.2 stable, but when will it be released?

Hi,

On 5 November 2012 08:39, Chris Angelico <rosuav@gmail.com> wrote:

On Sat, Nov 3, 2012 at 9:15 AM, Joe Van Dyk <joe@tanga.com> wrote:
Point of random curiosity: The commit mentioned adds the following line:

if (rinfo->reloptions && strlen(rinfo->reloptions) > 0)

Is there a reason this isn't done as:

if (rinfo->reloptions && *rinfo->reloptions)

? It seems like overkill to ascertain the string length just to find
out if the first character is the null terminator.

My guess is to be multibyte encoding safe: UTF-16 or similar.

--
Ondrej Ivanic
(ondrej.ivanic@gmail.com)

#4Chris Angelico
rosuav@gmail.com
In reply to: Ondrej Ivanič (#3)
Re: alter view foo set () -- fixed in 9.2 stable, but when will it be released?

On Mon, Nov 5, 2012 at 8:48 AM, Ondrej Ivanič <ondrej.ivanic@gmail.com> wrote:

On 5 November 2012 08:39, Chris Angelico <rosuav@gmail.com> wrote:

Point of random curiosity: The commit mentioned adds the following line:

if (rinfo->reloptions && strlen(rinfo->reloptions) > 0)

Is there a reason this isn't done as:

if (rinfo->reloptions && *rinfo->reloptions)

? It seems like overkill to ascertain the string length just to find
out if the first character is the null terminator.

My guess is to be multibyte encoding safe: UTF-16 or similar.

Oh, is your strlen function not the default C strlen, then? I'd best
not look at out-of-context patches then, heh :)

ChrisA

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Chris Angelico (#2)
Re: alter view foo set () -- fixed in 9.2 stable, but when will it be released?

Chris Angelico <rosuav@gmail.com> writes:

Point of random curiosity: The commit mentioned adds the following line:
if (rinfo->reloptions && strlen(rinfo->reloptions) > 0)
Is there a reason this isn't done as:
if (rinfo->reloptions && *rinfo->reloptions)

Just that the former is the general coding style in pg_dump, not the
latter.

pg_dump typically isn't working with long strings in these places, so
I'd be pretty surprised if this was a worthwhile optimization. But if
we were going to do it we should do it throughout pg_dump, not just here.

regards, tom lane