Re: BUG #3841: core dump in uuid-ossp - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #3841: core dump in uuid-ossp
Date
Msg-id 20071227170437.GM5709@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #3841: core dump in uuid-ossp  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #3841: core dump in uuid-ossp
List pgsql-bugs
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Please try the attached patch.
>
> Most of the invocations of pguuid_complain will be outright lies as to
> which function is complaining.  Please rethink the error message.

Doh!  Sorry.  How about this:

static void
pguuid_complain(uuid_rc_t rc)
{
    char    *err = uuid_error(rc);

    if (err != NULL)
        ereport(ERROR,
                (errmsg("OSSP uuid failure: %s", err)));
    else
        ereport(ERROR,
                (errmsg("OSSP uuid failure: error code %d", rc)));
}


Alternatively we could pass the called function name into
pguuid_complain, but I'm not sure it's worth the trouble (what does it
give the user, anyway?)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Server does not start when log_statement_stats is set to on
Next
From: Tom Lane
Date:
Subject: Re: BUG #3841: core dump in uuid-ossp