Received: from gw-nl5.philips.com (gw-nl5.philips.com [212.153.235.99]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0VJ3Fl10374 for ; Thu, 31 Jan 2002 14:03:16 -0500 (EST) (envelope-from tom.kemp@philips.com) Received: from smtpscan-nl1.philips.com (localhost.philips.com [127.0.0.1]) by gw-nl5.philips.com with ESMTP id UAA28117 for ; Thu, 31 Jan 2002 20:03:14 +0100 (MET) (envelope-from tom.kemp@philips.com) From: tom.kemp@philips.com Received: from smtpscan-nl1.philips.com(130.139.36.21) by gw-nl5.philips.com via mwrap (4.0a) id xma028115; Thu, 31 Jan 02 20:03:14 +0100 Received: from smtprelay-us1.philips.com (localhost [127.0.0.1]) by smtpscan-nl1.philips.com (8.9.3/8.8.5-1.2.2m-19990317) with ESMTP id UAA02919 for ; Thu, 31 Jan 2002 20:03:13 +0100 (MET) Received: from arj001soh.diamond.philips.com (amsoh01.diamond.philips.com [161.88.79.212]) by smtprelay-us1.philips.com (8.9.3/8.8.5-1.2.2m-19990317) with ESMTP id NAA07416 for ; Thu, 31 Jan 2002 13:03:12 -0600 (CST) Subject: apache-php-postgresql connection question To: pgsql-php@postgresql.org X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: Date: Thu, 31 Jan 2002 12:11:24 -0700 X-MIMETrack: Serialize by Router on arj001soh/H/SERVER/PHILIPS(Release 5.0.5 |September 22, 2000) at 31/01/2002 13:06:51 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Archive-Number: 200201/95 X-Sequence-Number: 898 Hi, I am new to apache, php, and postgresql. I had been tasked with creating a database for use in my work environment, accessible via web browsers. I read up on SQL, postgresql and mysql and chose postgresql. I have the database built and rebuildable via sql script for postgresql implementation. I am being pushed to rewrite this and use MySQL by my IT department. I don't want to use MySQL, based on some advantages I have seen during comparison research and the expected future size and complexity of the database. Some advantages that I am using are views, subqueries, triggers and foreign keys. I have had to try to justify Postgresql ( IT Department). One advantage that I planned to make good use of is views. However, I am being told that if I use web access through apache to PHP to my postgresql server, I am opening a single user connection and views become irrelevant in regard to permissions. My knowledge/expectation based on reading books was that I could use the database view permissions I set up for in postgresql for a go/no-go on database use of the views via apache server -> php engine -> connection request to postgresql server. I am a bit confused now. My understanding was I could use the pg_connect() command, supplying username and password in a php script, and have the connect be based on the security of the database permissions. Is this not true? Can I not do this for each browser based request? Also, if I do a persistent connection, it appears that PHP will try to use this connection if it exists, prior to creating a new persistent connection, right? Well, does it only reuse the already connected persistent if it is the same user? How does this work? Does it check that it is the same user/password (does my script have to supply this in the second persistent connection function) prior to using the preexisting connection? Is it tied to the current browser request? Thanks in advance for your time and help! Tom