X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6992A563EF for ; Tue, 8 Mar 2005 11:48:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36562-09 for ; Tue, 8 Mar 2005 11:48:17 +0000 (GMT) Received: from lerami.lerctr.org (lerami.lerctr.org [192.147.25.11]) by svr1.postgresql.org (Postfix) with ESMTP id D16E955965 for ; Tue, 8 Mar 2005 11:48:16 +0000 (GMT) Received: from lerlaptop.lerctr.org ([192.147.25.14]) by lerami.lerctr.org with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.50) id 1D8dCE-0002Rp-Gg for pgsql-sql@postgresql.org; Tue, 08 Mar 2005 05:48:19 -0600 From: Larry Rosenman Organization: LERCTR Consulting To: pgsql-sql@postgresql.org Subject: Query issue/8.0.1/Serendipity Date: Tue, 8 Mar 2005 05:48:16 -0600 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503080548.17179.ler@lerctr.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/124 X-Sequence-Number: 20603 I have an 8.0.1 server running the Blogging software serendipity, and the following query fails with "relation e not defined", but it is on the first line: "SELECT timestamp FROM serendipity_entries e, serendipity_category c, serendipity_entrycat ec LEFT OUTER JOIN serendipity_entryproperties ep_cache_extended ON (e.id = ep_cache_extended.entryid AND ep_cache_extended.property = 'ep_cache_extended') LEFT OUTER JOIN serendipity_entryproperties ep_cache_body ON (e.id = ep_cache_body.entryid AND ep_cache_body.property = 'ep_cache_body') LEFT OUTER JOIN serendipity_entryproperties ep_access ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access') LEFT JOIN serendipity_entryproperties ep_sticky ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky') WHERE e.timestamp >= 1109656800 AND e.timestamp <= 1112335200 AND e.timestamp <= 1110241185 AND e.isdraft = 'false' AND (ep_access.property IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = 1)) AND e.id = ec.entryid AND c.categoryid = ec.categoryid AND c.category_left BETWEEN 3 AND 4" The software is at: http://www.s9y.org/ here is the exact response from Pg: serendipity=# SELECT timestamp FROM serendipity_entries e, serendipity_categoryc, serendipity-# serendipity_entrycat ec LEFT OUTER JOIN serendipity_entryproperties serendipity-# ep_cache_extended ON (e.id = ep_cache_extended.entryid AND serendipity(# ep_cache_extended.property = 'ep_cache_extended') LEFT OUTER JOIN serendipity-# serendipity_entryproperties ep_cache_body ON (e.id = ep_cache_body.entryid serendipity(# AND ep_cache_body.property = 'ep_cache_body') LEFT OUTER JOIN serendipity-# serendipity_entryproperties ep_access ON (e.id = ep_access.entryid AND serendipity(# ep_access.property = 'ep_access') LEFT JOIN serendipity_entryproperties serendipity-# ep_sticky ON (e.id = ep_sticky.entryid AND ep_sticky.property = serendipity(# 'ep_is_sticky') WHERE e.timestamp >= 1109656800 AND e.timestamp <= 1112335200 serendipity-# AND e.timestamp <= 1110241185 AND e.isdraft = 'false' AND (ep_access.property serendipity(# IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR serendipity(# (ep_access.value = 'private' AND e.authorid = 1)) AND e.id = ec.entryid AND serendipity-# c.categoryid = ec.categoryid AND c.category_left BETWEEN 3 AND 4; ERROR: relation "e" does not exist serendipity=# What is wrong? serendipity=# select version(); version --------------------------------------------------------------------- PostgreSQL 8.0.1 on i686-unknown-sysv5UnixWare7.1.4, compiled by cc (1 row) serendipity=# -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-351-4152 E-Mail: ler@lerctr.org US Mail: 3535 Gaspar Drive, Dallas, TX 75220-3611