← Back to team overview

anewt-developers team mailing list archive

Re: [Branch ~sander-sinaasappel/anewt/anewt.new.cxs] Rev 1482: [database] Force opening a new PostgreSQL connection on instantiation

 

Hey,

For what it's worth: the shining new database module in anewt.uws always
passes the PGSQL_CONNECT_FORCE_NEW flag to pg_connect() or pg_pconnect() as
well. In other words: I agree with the change, but this code is largely
obsoleted by the new database work.

(I'll remove the old database and autorecord modules from anewt.uws Real
Soon Now I think.)

    — Wouter

2009-07-20 klockan 22:47 skrev noreply@xxxxxxxxxxxxx:
> ------------------------------------------------------------
> revno: 1482
> committer: Sander van Schouwenburg <sander@xxxxxxxxxxxxx>
> branch nick: anewt.new.cxs
> timestamp: Mon 2009-07-20 17:55:56 +0200
> message:
>   [database] Force opening a new PostgreSQL connection on instantiation
>   
>   The default of pg_connect() is to use the same open connection if the
>   connection string is exactly the same.  However, since explicitly instantiating
>   a new Database instance usually means you want a new connection, i've added a
>   flag to always create a new connection.
>   
>   The singleton-ness of the Database class pretty much ensures there are no
>   uncessesary calls to pg_connect() anyway.
>   
>   
>   (from anewt.new.svn:91)
> modified:
>   database/postgresql/backend.lib.php

Attachment: signature.asc
Description: Digital signature