pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eric Marsden <emarsden@mail.dotcom.fr>
To: pgsql-interfaces@postgreSQL.org
To: pgsql-hackers@postgreSQL.org
Cc: Zeev Suraski <bourbon@netvision.net.il>
Cc: Jouni Ahto <jah@cultnet.fi>
Subject: Re: [INTERFACES] Convert PGconn, PGresult to opaque types?
Date: 24 Aug 1998 16:54:46 +0200
Message-ID: <m2g1emv39l.fsf@cook.onecert.fr> (raw)
References: <23263.903968555@sss.pgh.pa.us>

>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:

  (sorry, attributions are lost here)
  
  >>>>> Basically this would force applications to use the accessor functions
  >>>>> as recommended in the documentation, and not touch fields of a PGconn
  >>>>> object directly.  (Ditto for PGresult.)
  >>> 
  >>> I am scared about external stuff like php.  If they use it, and we
  >>> release something that doesn't work with their stuff, we are cooked
  >>> until they upgrade.
  TL> 
  TL> But if they are using any direct references to fields of the PGconn
  TL> struct, their stuff *already* won't work with 6.4.  Admittedly it'd
  TL> most likely only take a recompile to fix, and not code changes
  TL> (however trivial).  But if they'd been using only the documented API,
  TL> ie using the accessor functions and not directly touching the struct,
  TL> then a new shared library or DLL could be plopped right in without even
  TL> a recompile of calling applications.
  TL> 
  TL> Is the PHP source code available?  It wouldn't take much work to check
  TL> whether it will compile without a definition for struct pg_conn.

The PHP source is available from http://www.php.net/. From a quick
look through it, it does access the PGconn structure directly. Stuff
like (this is from the file php3.0.2a/functions/pgsql.c):

  lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, 8192))

However, the whole PostgreSQL-specific stuff is only 1400 lines worth,
and the PHP guys are reputed to very active, so I don't think a change
should pose too much of a problem if they are forewarned.

[I have CCed the PHP/PostgreSQL module developers]

-- 
Eric Marsden
emarsden @ mail.dotcom.fr
It's elephants all the way down



view thread (8+ messages)  latest in thread

Message-ID: <m2g1emv39l.fsf@cook.onecert.fr>
Permalink:  ../m2g1emv39l.fsf@cook.onecert.fr/
Also on:    postgresql.org/message-id/m2g1emv39l.fsf@cook.onecert.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: emarsden@mail.dotcom.fr, pgsql-hackers@postgreSQL.org, bourbon@netvision.net.il, jah@cultnet.fi
  Subject: Re: [INTERFACES] Convert PGconn, PGresult to opaque types?
  In-Reply-To: <m2g1emv39l.fsf@cook.onecert.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox