Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B97BA632CE3; Wed, 21 Oct 2009 06:18:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 60000-05; Wed, 21 Oct 2009 09:18:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mail.postgresql.org (Postfix) with ESMTP id B5FE36329ED; Wed, 21 Oct 2009 06:18:20 -0300 (ADT) Received: by fxm6 with SMTP id 6so7435297fxm.19 for ; Wed, 21 Oct 2009 02:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=pdi840k0WrXJLHDZqBw1y5ZPp5iM41sgIWJvWFJTi0c=; b=jAjwIAp6puZAPzBFfOonSE2lvYpaUigNzDsOSmBiYp+fsdbkebGo1ogSFe6OCufaMj 33ZFcbUC70ciOg00jeMxQq/Arz9EEX5i3MOLNVd2iAsDDiQFizO2qkE5R1gp0LgcLggZ MfnBxgq5hGzPQ9zWnX5rP3ksxO6bvISH8B60U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=vL+oIpqcVs4OU1mh1uYnXcIWW8U8M221t3+fW4g3xcY//+EyMb+CWzVZDkVpfd4UyE /1WhKEPLLoIVAjd1vAteolSd+QdGNTshwfoPecF1vBjnMLs7RpvmlOLLTX8A+xBbjCkb E0BdRxcoNoPy0FWr7Disyurrs2PztnHjrsP1E= MIME-Version: 1.0 Received: by 10.223.144.67 with SMTP id y3mr1440471fau.20.1256116699093; Wed, 21 Oct 2009 02:18:19 -0700 (PDT) In-Reply-To: <1256115162.3362.596.camel@pcd12478> References: <1256043135.3362.488.camel@pcd12478> <1256044824.28209.3.camel@raker.ateb.com> <1256115162.3362.596.camel@pcd12478> From: Thom Brown Date: Wed, 21 Oct 2009 10:17:59 +0100 Message-ID: Subject: Re: PostgreSQL driver for Joomla review To: Csaba Nagy Cc: "pgsql-php@postgresql.org" , "pgsql-general@postgresql.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.467 tagged_above=-10 required=5 tests=AWL=0.132, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/788 X-Sequence-Number: 154482 2009/10/21 Csaba Nagy : > Hi Thom, > > Sorry for the delay, I got sick in the meantime. I see that others > already did some review, I will do a quick one too, later maybe I'll > actually try it out... so after a quick review: > > * on line 218, the " ENCODING '$DBname')" part feels wrong, you probably > want hardcoded UTF8 encoding there ? > * as Merlin already commented, transactions are always safe in postgres, > this is no mysql ;-) > * again, as Merlin commented, getTableList is getting the data bases, > which doesn't make sense, but maybe you actually wanted to get the > tables - in this case you don't have a typo but you need to change the > query ;-) > > If I'll get some time I'll test it too, but likely not this week... Thanks for the feedback Csaba, Yes, I will change the function which uses transactions, and also replace any conditional UTF8 statements with hard-coded ones. The getTableList function...erm... not sure what I was thinking there. How about: select tablename from pg_tables where schemaname='public'; As for testing it, you won't be able to with the existing Joomla code base as most of the queries will fail as they've been terribly written, and that's because MySQL lets you get away with it for some reason. I imagine the only way to test it is to either get a copy of modified Joomla from me (although it still needs work), or create a test app which uses that class, but you will need the parent JDatabase class from Joomla too... and not sure how deep that rabbit hole goes as that will also in turn inherit from another class. Thanks again. Thom