Re: Proposed patch for contrib/cube - Mailing list pgsql-patches

From Neil Conway
Subject Re: Proposed patch for contrib/cube
Date
Msg-id 1153175087.5450.29.camel@localhost
Whole thread Raw
In response to Proposed patch for contrib/cube  (Joshua Reich <josh@root.net>)
Responses Re: Proposed patch for contrib/cube
List pgsql-patches
On Mon, 2006-07-17 at 17:55 -0400, Joshua Reich wrote:
> Ok. So, the cube code looks very unmaintained (not to offend anyone),
> but it is all in V0 and I believe make installcheck fails out of the box
> due to new error message formats.

It passes for me with CVS HEAD. The cube regression test is also run as
part of the buildfarm process, so it sounds like an error on your end.

> I'm in the process of twisting the arm of another guy here to help me
> clean up the code - if that is ok with the powers that be?

Cleanup would certainly be welcome.

> This is my first patch submission, so please let me know what heinous
> errors I have made

You should submit patches in context diff format (diff -c). You should
also send a single patch for all the (related) changes you want to make,
and you seem to have omitted the diff headers. You should generate
patches like:

$ cvs diff                    # from the root of the source tree

or

$ diff -rc ../orig_tree .     # from the root of the modified tree

Depending on whether you're working against CVS or if you've made a copy
of the source tree to make your changes in.

>       if (ARRNELEMS(ll) != dim)
>       {
>               ereport(ERROR,
>                       (errcode(ERRCODE_ARRAY_ELEMENT_ERROR),
>                       errmsg("UR and LL arrays must be of same
length")));
>
>               PG_RETURN_NULL();
>       }

You don't need to return anything after ereport(ERROR) -- it won't
return control to the caller.

-Neil



pgsql-patches by date:

Previous
From: Joshua Reich
Date:
Subject: Proposed patch for contrib/cube
Next
From: Tom Lane
Date:
Subject: Re: Proposed patch for contrib/cube