Re: [GENERAL] Dynamic binding in plpgsql function

2011-03-02 Thread Pierre Racine
Is EXECUTE slower than a direct assignment call? >-Original Message- >From: Vibhor Kumar [mailto:vibhor.ku...@enterprisedb.com] >Sent: 1 mars 2011 18:24 >To: Pierre Racine >Cc: pgsql-general@postgresql.org >Subject: Re: [GENERAL] Dynamic binding in plpgsql function >

[GENERAL] Dynamic binding in plpgsql function

2011-03-01 Thread Pierre Racine
Hi, I would like to write a generic plpgsql function with a text parameter being a callback function name so that my general function can call this callback function. e.g.: CREATE OR REPLACE FUNCTION ST_MyCallbackFunction(y int) RETURNS int AS $$ DECLARE BEGIN RETURN someCal

Re: [GENERAL] locating cities within a radius of another

2010-07-21 Thread Pierre Racine
Hum right... Better follow Paul instructions. We are in geographic coordinates here... Sorry. This would work in a limited projected space. >-Original Message- >From: pgsql-general-ow...@postgresql.org >[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of >Pierre Raci

Re: [GENERAL] locating cities within a radius of another

2010-07-21 Thread Pierre Racine
Once PostGIS is installed you can do it with a single SQL query looking like this: SELECT dest.id, ST_Distance(ST_MakePoint(orig.longitude, orig.latitude), ST_MakePoint(dest.longitude, dest.latitude)) FROM yourcitytable orig, yourcitytable dest WHERE ST_DWithin(ST_MakePoint(orig.longitude, orig.

[GENERAL] Keeping only one postgres.exe instance running

2009-03-05 Thread Pierre Racine
Hi, Is there a way to tell PostgreSQL to keep only one instance of postgres.exe running? Thanks, Pierre -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] HELP - Recover function delete

2005-09-19 Thread Pierre Racine
Hi, I just hit twice the delete button on a function I spent two days writing (without backing it up. I know... I know...). Is there a way to recover it? A simple garbage would do the job. I don't know many software now that do not implement a sort of simple mecanism to recover what we threw