Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Sai Hertz And Control Systems
Dear Martin Marques and other kind people out their , In mathematics I would have written it something like A = antilog (3·3234) = 2144 As I can understand, this is a 10 base log, so that what you want is 10^(3.3234)? Though antilog did not solve my problem the link below helped me to p

Re: [SQL] Radius of a zip code

2003-12-26 Thread Michael Fuhr
On Fri, Dec 26, 2003 at 10:34:04PM -0600, Bruno Wolff III wrote: > On Fri, Dec 26, 2003 at 19:42:44 -0700, > Michael Fuhr <[EMAIL PROTECTED]> wrote: > > > > I have several databases with lat/lon coordinates and frequently make > > "show me all records within a certain distance of this point" que

Re: [SQL] Radius of a zip code

2003-12-26 Thread Bruno Wolff III
On Fri, Dec 26, 2003 at 19:42:44 -0700, Michael Fuhr <[EMAIL PROTECTED]> wrote: > > I have several databases with lat/lon coordinates and frequently make > "show me all records within a certain distance of this point" queries. > I wrote a haversine() function that uses the Haversine Formula to >

Re: [SQL] MD5 encrypt

2003-12-26 Thread Michael Fuhr
On Wed, Dec 24, 2003 at 11:47:53AM -0500, [EMAIL PROTECTED] wrote: > > Is there any function on postgresql that allows to encrypt data when > making an Insert statment? What kind of encryption are you looking for? MD5 is a one-way hash: you can't decrypt the hash to get back the original plaintex

Re: [SQL] Radius of a zip code

2003-12-26 Thread Joe Conway
Michael Fuhr wrote: I wrote a haversine() function that uses the Haversine Formula to calculate the great circle distance between two points on a sphere (assuming the earth is a perfect sphere is accurate enough for my uses). Here's a web site with related info: http://www.census.gov/cgi-bin/geo/gi

Re: [SQL] Radius of a zip code

2003-12-26 Thread Michael Fuhr
On Fri, Dec 26, 2003 at 05:42:08PM -0600, Andy Lewis wrote: > I was trying to find all zip codes within a given zip code or radius. > > I have map points and Latitude and Longitude in my zip table. > > I remember seeing a post or two referencing this but can't see to find > it. The code in con

Re: [SQL] Radius of a zip code

2003-12-26 Thread Tom Lane
"Andy Lewis" <[EMAIL PROTECTED]> writes: > I was trying to find all zip codes within a given zip code or radius. I think there are canned solutions for this available in PostGIS --- have you looked at that? > I've tried the following with no luck: > -- 20 Miles > --select 20 * 360.0 / (7900.0 *

[SQL] Radius of a zip code

2003-12-26 Thread Andy Lewis
Title: Message Hello all,   I was trying to find all zip codes within a given zip code or radius.   I have map points and Latitude and Longitude in my zip table.   I remember seeing a post or two referencing this but can't see to find it.   I've tried the following with no luck:   -- 20 M

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Tom Lane
Sai Hertz And Control Systems <[EMAIL PROTECTED]> writes: >> What is the mathematical operation that "antilog" is supposed to perform? > Its going to calculate rate of intrest for an fixed deposit , This is not a mathematical operation, it is a financial issue that has to conform to rules develo

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Yasir Malik
The antilog of x is 10^x, so all you need to do is used the ^ operator. If you are doing the antilog for some other base, there is formula to do that as well, but I'm forgetting it. Regards, Yasir On Fri, 26 Dec 2003, Martin Marques wrote: > Date: Fri, 26 Dec 2003 19:34:35 -0300 > From: Martin Ma

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Sai Hertz And Control Systems
Dear Wei Weng , Nope select exp(3.3234) as a2144 Gives me 27.754555808589792 But the answer expected is some what near to 2144 The log tables show this Regards, Vishal Kashyap. What is the mathematical operation that "antilog" is supposed to perform? Its going to calculate rate of intrest for an

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 19:46, Sai Hertz And Control Systems escribió: > Dear Martin Marques , > > >>In mathematics I would have written it something like > >> > >>A = antilog (3·3234) = 2144 > >> > >> > > > >As I can understand, this is a 10 base log, so that what you want is > >10^(3.3234)? > >

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Wei Weng
Sai Hertz And Control Systems wrote: Dear Martin Marques , In mathematics I would have written it something like A = antilog (3·3234) = 2144 As I can understand, this is a 10 base log, so that what you want is 10^(3.3234)? For that you have the exponential operator ^. Nope select exp(3

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Sai Hertz And Control Systems
Dear Martin Marques , In mathematics I would have written it something like A = antilog (3·3234) = 2144 As I can understand, this is a 10 base log, so that what you want is 10^(3.3234)? For that you have the exponential operator ^. Nope select exp(3.3234) as a2144 Gives me 27.7545558085

Re: [SQL] Anti log in PostgreSQL

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 19:12, Sai Hertz And Control Systems escribió: > Dear all , > > In one of our project I require to calculate antilog of (3.3234) > But I could not find any functions in Documentation for the same. > > In mathematics I would have written it something like > > A = antilog (3·32

[SQL] Anti log in PostgreSQL

2003-12-26 Thread Sai Hertz And Control Systems
Dear all , In one of our project I require to calculate antilog of (3.3234) But I could not find any functions in Documentation for the same. In mathematics I would have written it something like A = antilog (3·3234) = 2144 Any suggestions or links are most welcome . Regards, Vishal Kashyap.

Re: [SQL] Multiple DB servers on a single machine

2003-12-26 Thread A.Bhuvaneswaran
> I am having an RH Linux 7.3 box which is already running an Postgres > 7.3.4 server. I want to install Postgres 7.4 on the same machine. Is > it possible to install different versions of Postgres in a single RH > Linux 7.3 box and the postmaster up and running for both (7.3.4 & 7.4 > database ser