Re: Making small bits of code available
От | Bruno Wolff III |
---|---|
Тема | Re: Making small bits of code available |
Дата | |
Msg-id | 20020907162040.GA29893@wolff.to обсуждение исходный текст |
Ответ на | Re: Making small bits of code available (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Making small bits of code available
|
Список | pgsql-general |
On Sat, Sep 07, 2002 at 10:05:14 -0400, Bruce Momjian <pgman@candle.pha.pa.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?
В списке pgsql-general по дате отправления: