Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

6 views
Skip to first unread message

Joe Van Dyk

unread,
Nov 2, 2012, 6:15:18 PM11/2/12
to
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

Chris Angelico

unread,
Nov 4, 2012, 4:39:07 PM11/4/12
to
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


--
Sent via pgsql-general mailing list (pgsql-...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Ondrej Ivanič

unread,
Nov 4, 2012, 4:48:23 PM11/4/12
to
Hi,

On 5 November 2012 08:39, Chris Angelico <ros...@gmail.com> wrote:
> On Sat, Nov 3, 2012 at 9:15 AM, Joe Van Dyk <j...@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...@gmail.com)

Chris Angelico

unread,
Nov 4, 2012, 6:55:12 PM11/4/12
to
On Mon, Nov 5, 2012 at 8:48 AM, Ondrej Ivanič <ondrej...@gmail.com> wrote:
> On 5 November 2012 08:39, Chris Angelico <ros...@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

Tom Lane

unread,
Nov 4, 2012, 7:10:51 PM11/4/12
to
Chris Angelico <ros...@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
0 new messages