Re: Making small bits of code available

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Making small bits of code available
Date: 2002-09-07 16:20:40
Message-ID: 20020907162040.GA29893@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sat, Sep 07, 2002 at 10:05:14 -0400,
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
>
> What would be really valuable would be to add your routines to
> /contrib/earthdistance. Is that possible?

Yes.

Right now the script contains:

Some leading comments

grant execute to public commands for each function in contrib/cube

A definition of the earth domain along with comments about what check
constraints should be used (until domains support check constraints)

For each new function there is a comment about it, a definition (using
language 'sql') and a grant execute to public

There is currently no regression test.

Now to the questions.

Were the function names (earth, sec_to_gc, gc_to_sec, ll_to_earth, latitude,
longitude, earth_distance, and earth_box) acceptable?

Should I make a separate regression test file or add it on to the existing
one for earth_distance?

Should I make a separate README file or just add stuff to the end of the
existing REAMDE file?

Should I leave the grants in, leave that to the administrator or provide
a separate script?

Should the creation of these functions be added to the existing script
for earth_distance or should it be a separate script? It seems unlikely
that someone would be using both of these at the same time, since one
is based on the point type and the other on the cube type. However the
overhead of installing both seems small, so maybe making it easier to
try both and then pick one is worthwhile.

Another option would be to go back to the contrib/cube install script
and and grants for the functions there. And then just to a grant for
the old geo_distance function in earthdistance (since that is the only
'C' function)? I didn't do that previously because the previous contrib/cube
didn't, but of course, functions didn't have an execute privilege previously.
If I do that, do I have to grant public access to internal functions
(used for the gist index) or can I just make the ones meant for users
to access directly public?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-09-07 16:52:06 Re: Making small bits of code available
Previous Message Jean-Christian Imbeault 2002-09-07 15:48:20 PostgresQL or PHP bug?

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-09-07 16:23:52 --with-maxbackends
Previous Message Peter Eisentraut 2002-09-07 16:16:38 pg_hba.conf documentation