[dev] More datatree problems
Ben Chavet
ben at horde.org
Mon Mar 21 17:48:27 PST 2005
I've done as much troubleshooting as I can on this, I just don't know
what the error means...time to call in the SQL experts :)
When I try to get a listing of ansel galleries, I get the following
error in the horde log (whitespace added to help readability). Latest
HEAD + postgres.
--Ben
[ansel] DB Error: unknown error: SELECT c.datatree_id, c.datatree_name
FROM horde_datatree c LEFT JOIN horde_datatree_attributes a1 ON
a1.datatree_id = c.datatree_id LEFT JOIN horde_datatree_attributes a2
ON a2.datatree_id = c.datatree_id LEFT JOIN horde_datatree_attributes
a3 ON a3.datatree_id = c.datatree_id WHERE c.group_uid =
'horde.shares.ansel' AND (((a1.attribute_name = 'owner' AND
a1.attribute_value = 'ben') OR (a1.attribute_name = 'perm_users' AND
a1.attribute_key = 'ben' AND CASE WHEN CAST(a1.attribute_value AS
VARCHAR) ~ '^-?[0-9]+$' THEN (CAST(a1.attribute_value AS INTEGER) & 2)
<> 0 ELSE FALSE END) OR (a1.attribute_name = 'perm_creator' AND CASE
WHEN CAST(a1.attribute_value AS VARCHAR) ~ '^-?[0-9]+$' THEN
(CAST(a1.attribute_value AS INTEGER) & 2) <> 0 ELSE FALSE END) OR
(a1.attribute_name = 'perm_default' AND CASE WHEN
CAST(a1.attribute_value AS VARCHAR) ~ '^-?[0-9]+$' THEN
(CAST(a1.attribute_value AS INTEGER) & 2) <> 0 ELSE FALSE END)) AND
a2.attribute_name = 'owner' AND a2.attribute_value = 'ben') AND
datatree_parents = '' AND a1.datatree_id = a2.datatree_id AND
a3.attribute_name = 'name' GROUP BY c.datatree_id, c.datatree_name,
c.datatree_order ORDER BY a3.attribute_value ASC LIMIT 9 OFFSET 0
[nativecode=ERROR: column "a3.attribute_value" must appear in the GROUP
BY clause or be used in an aggregate function] [on line 1151 of
"/home/ben/pear/Horde/DataTree/sql.php"]
More information about the dev
mailing list