Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 33E7D650134 for ; Fri, 18 Jul 2008 08:45:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 39080-03 for ; Fri, 18 Jul 2008 08:45:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 6DA7A650103 for ; Fri, 18 Jul 2008 08:45:07 -0300 (ADT) Received: from localhost (182-35-113-92.pool.ukrtel.net [92.113.35.182] (may be forged)) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m6IBlLii017926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 18 Jul 2008 04:47:24 -0700 Date: Fri, 18 Jul 2008 14:44:57 +0300 From: Alexey Klyukin To: pgsql-www@postgresql.org Subject: pugs.postgresql.org error in pg_query() Message-ID: <20080718114457.GA637@katana.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Fri, 18 Jul 2008 04:47:27 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/113 X-Sequence-Number: 15543 Hi, I've noticed that pugs.postgresql.org shows this error on some pages: warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT count( DISTINCT ON (node.nid) node.nid) FROM node nod... ^ in /usr/local/www/drupal5/includes/database.pgsql.inc on line 125. user warning: query: SELECT count( DISTINCT ON (node.nid) node.nid) FROM node node LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid INNER JOIN users users ON node.uid = users.uid LEFT JOIN node n ON node.nid = n.nid INNER JOIN node_access na ON na.nid = node.nid WHERE ((n.moderate != 1)) AND (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all'))) AND ( (node.status = '1') ) in /usr/local/www/drupal5/includes/database.pgsql.inc on line 144. For example you can see this error there: http://pugs.postgresql.org/tracker This error is drupal-related and discussed on this page: http://drupal.org/node/128846#comment-759767 This patch seems to correct it: http://drupal.org/files/issues/database.pgsql_.inc__1.patch although I've never checked this since I don't have drupal installation around. -- Alexey Klyukin http://www.commandprompt.com/ The PostgreSQL Company - Command Prompt, Inc.