Connecting to PostGreSQL on same machine: Mac OSX
Frank D. Engel, Jr.
fde101 at fjrhome.net
Sat Dec 11 10:38:46 CST 2004
On Dec 11, 2004, at 4:05 AM, Pierre Sahores wrote:
> Hello Katir,
> Le 11 déc. 04, à 05:51, Sivakatirswami a écrit :
>> Alright... I've successfully installed PostGreSQL on my mac... in the
>> terminal it's up and running, I've created a database and just now
>> select * from taskroster
>> and got my two test rows returned... but..
>> in the Mac's activity monitor... i don't see a process named
> Need to be visible there (3 lines of postgres processes), else the
> server is not running.
> Did you use the best Mac OS X suited installer available all around at
> <http://www.entropy.ch/software/macosx/postgresql/>. Else, it's the
> best to do. Marc Liyanage explains all what need to be done to install
> and set up PostgreSQL on our Macs, where the Apple's official page is
> mainly "approximative"...
You shoud note that the server is not one of the "My Processes" in the
activity monitor. Show "Other User Processes" or "All Processes" and a
process name of "postgres" should be listed three times.
I find it highly unlikely that the server is not running if you were
able to execute a query; being able to communicate with the server is
generally an indication that it is running ;-)
>> just the tcsh shell I have open to talk to Postgres...
>> And also, in rev, this fails:
>> could not connect to server: Connection refused
>> Is the server running on host "localhost" and accepting
>> TCP/IP connections on port 5432?
> About the TCP/IP connections, they are set by default for the
> localhost only (and it enought to feet the app server needs..). You
> can if needed tune this in modifying the needed line in the
> "postgresql.conf" file.
No, this is *not* the default for the current release versions of
PostgreSQL. By default, TCP/IP connections (the only kind you can make
to PostgreSQL through Rev) are disabled. You need to make changes in
two files in the data directory of PostgreSQL:
You need to enable TCP/IP connections in postgresql.conf, and you need
to configure your authentication settings in pg_hba.conf.
This is not described on the page listed below, but is mentioned in the
PostgreSQL documentation; for details see:
>> my computer name on the lan is "katir.hindu.org" but
> if you expect to run the connection inside a Rev application's
> server..., use this instead of your revOpenDatabase command :
> if PGLinkOpen is a number then get revdb_disconnect("projetsdac")
> "myPassWord") into PGLinkOpen
> It's best to send it once only in app server mode (when it start) and
> for each new request in CGI mode. Use PGLinkOpen as a global value.
Personally, I like to use a custom property for this:
set the database of this stack to revOpenDatabase(...)
if the database of this stack is not a number then
answer error "Failed to connect to the database." & the lineDelimiter
& the lineDelimiter & the database of this stack titled "Connection
>> does not work either..
> Let us know how it goes...
> Best, Pierre
>> I'm sure this must be simple...
>> Sannyasin Sivakatirswami
>> Himalayan Academy Publications
>> at Kauai's Hindu Monastery
>> katir at hindu.org
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
> Bien cordialement, Pierre Sahores
> 100, rue de Paris
> F - 77140 Nemours
> psahores+ at +easynet.fr
> sc+ at +sahores-conseil.com
> GSM: +33 6 03 95 77 70
> Pro: +33 1 64 45 05 33
> Fax: +33 1 64 45 05 33
> WEB/EAI services & ACID DB over IP
> "Mutualiser les deltas de productivité"
> use-revolution mailing list
> use-revolution at lists.runrev.com
Frank D. Engel, Jr. <fde101 at fjrhome.net>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten
Son, that whosoever believeth in him should not perish, but have
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the use-livecode