Re: Making small bits of code available

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

Bruno Wolff III wrote:
> 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?

Sure.

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

No, just add. If someone wants earth measurements, it should all be in
one place.

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

Just add.

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

I would not add the grants.

> 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.

Install them both. Just make sure it is clear which is which, or are
yours superior and the old one should be removed?

> 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?

Not sure. I don't think we want to public permit this stuff unless the
admin asks for it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-09-07 17:26:11 Re: Fwd: "...integer[] references..." = error
Previous Message Bruno Wolff III 2002-09-07 16:20:40 Re: Making small bits of code available

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-07 16:52:41 Re: --with-maxbackends
Previous Message Bruno Wolff III 2002-09-07 16:25:50 Re: pg_hba.conf documentation