Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 5EAF19FB1CF for ; Thu, 9 Nov 2006 19:39:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 54592-09 for ; Thu, 9 Nov 2006 19:39:25 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by postgresql.org (Postfix) with ESMTP id 4F7999FB1BF for ; Thu, 9 Nov 2006 19:39:25 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so1024990nfb for ; Thu, 09 Nov 2006 15:39:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=a9kS3+MMJRiFivS1n5rrO5eWtNh/1Epnp8SLPQ/qRVFvQie+OKyJcOKv7j5vbUmLdFAjS9gHfN49HnFAk6ydp4pAe2PBpdqWliJJOpqZGkW6ICpkataDrZro+BaI0a0El2B4eWg8UIhzOE8m8dVXnzd79l1s5hlbuxi9ksvYRHo= Received: by 10.82.107.15 with SMTP id f15mr261266buc.1163115563141; Thu, 09 Nov 2006 15:39:23 -0800 (PST) Received: by 10.82.173.11 with HTTP; Thu, 9 Nov 2006 15:39:23 -0800 (PST) Message-ID: <1d7288990611091539g2554beava9f7cf902a6c3cbf@mail.gmail.com> Date: Thu, 9 Nov 2006 18:39:23 -0500 From: Brew To: "Servers24 Network" Subject: Re: PgSQL and integration between 2 PHP programs and a Java program Cc: pgsql-php@postgresql.org In-Reply-To: <7b872b430611091003q10f48coee46572e51c6f6e3@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_53475_19926129.1163115563100" References: <7b872b430611090218k55fc4cf3kf1fc83f0dccdebf2@mail.gmail.com> <1d7288990611090702w2b93e727qc2447fc5bef42fe7@mail.gmail.com> <7b872b430611091003q10f48coee46572e51c6f6e3@mail.gmail.com> X-Google-Sender-Auth: 57a80f8e8f317d08 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/33 X-Sequence-Number: 3650 ------=_Part_53475_19926129.1163115563100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Amir....... > I also have CAS ( Centeral Authentication Service ) in mind for SSO ( > Single Sign On ). They also have a phpCAS class that authenticates the users > against the CAS server and this way the user won't need to login again in > each application as phpCAS will check their ticket to see if they're logged > in or not. > It sounds like you've thought this through pretty well, more than you mentioned in your first email! Combining the users table can be as simple as doing a dump of the tables in the other databases, editing the sql to make up for the slightly differing syntax of table declaration, etc. and inserting them into the new database. The only snag is if you have duplicate user names, but then, if you make the username and unique index, it will create an error when you attempt to load in more than one user name and you can fix that some way. >Also I have another question : do I need to edit MySQL queries very much in my PHP >applications to interact with a PgSQL or not? Because most of the queries are the same and >maybe very few should be changed ( as far as I know! ). As Jaun mentioned, if you are using an abstraction layer already that would make it easy. If I recall, the basic difference between a mysql select and a postgreSQL select is that in postgreSQL you need to manually check the row count and then call them out by number, while in mysql you do a fetch_next and it goes until the end, I think. But that may have changed in later versions of PHP. Of course, if there are triggers and transactions in the database that will complicate things, but it's not likely in standard mysql. Others can probably give you advice I haven't thought of. At any rate, ask on the list and you'll get advice! (and with luck it will be good advice!) later..... brew -- Strange Brew (brew@theMode.com) Check out my Stock Option website http://www.callpix.com and my Musicians Free Classified http://www.TheMode.com ------=_Part_53475_19926129.1163115563100 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Amir.......
 
I also have CAS ( Centeral Authentication Service ) in mind for SSO ( Single Sign On ). They also have a phpCAS class that authenticates the users against the CAS server and this way the user won't need to login again in each application as phpCAS will check their ticket to see if they're logged in or not.
 
It sounds like you've thought this through pretty well, more than you mentioned in your first email!
 
Combining the users table can be as simple as doing a dump of the tables in the other databases, editing the sql to make up for the slightly differing syntax of table declaration, etc. and inserting them into the new database.  The only snag is if you have duplicate user names, but then, if you make the username and unique index, it will create an error when you attempt to load in more than one user name and you can fix that some way.
 
>Also I have another question : do I need to edit MySQL queries very much in my PHP >applications to interact with a PgSQL or not? Because most of the queries are the same and >maybe very few should be changed ( as far as I know! ).
 
As Jaun mentioned, if you are using an abstraction layer already that would make it easy.  If I recall, the basic difference between a mysql select and a postgreSQL select is that in postgreSQL you need to manually check the row count and then call them out by number, while in mysql you do a fetch_next and it goes until the end, I think.
 
But that may have changed in later versions of PHP.
 
Of course, if there are triggers and transactions in the database that will complicate things, but it's not likely in standard mysql.
 
Others can probably give you advice I haven't thought of.  At any rate, ask on the list and you'll get advice!  (and with luck it will be good advice!)
 
later.....
 
brew
--

Strange Brew (brew@theMode.com)

Check out my Stock Option website http://www.callpix.com
and my Musicians Free Classified http://www.TheMode.com
------=_Part_53475_19926129.1163115563100--