Re: another stupid question: Database is being accessed by other users

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Janning Vygen <vygen(at)planwerk6(dot)de>
Cc: PostgreSQL-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: another stupid question: Database is being accessed by other users
Date: 2001-06-29 18:11:30
Message-ID: 200106291811.f5TIBUN13218@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Janning Vygen wrote:
> Am Freitag, 29. Juni 2001 19:15 schrieb Jan Wieck:
> > Janning Vygen wrote:
>
> > > i always call pg_Close in my php scripts. Why are there still some
> > > processes and how can i achieve to drop the database??
> >
> > Maybe, but you're using pg_pconnect() instead of
> > pg_connect(), turning pg_close() effectively into a NOOP.
>
>
> i Love you!!
> Thanks a lot.

You're welcome. I usually have some error code checking
wrappers around all DB access, that spit out some nice error
page instead of messing up the regular one. So if possible,
all the PHP logic placed before the <html> tag.

Doing so has the advantage that it's easy to switch between
persistent connections in production/test and one-time
connections in development, by just editing one include file.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2001-06-29 18:22:01 Re: Linux
Previous Message Tom Lane 2001-06-29 18:07:29 Re: Re: Debian's PostgreSQL packages