Index: openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql 30 Jul 2003 04:56:41 -0000 1.4 +++ openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql 31 Jul 2003 01:24:31 -0000 1.5 @@ -261,4 +261,45 @@ + + + + + SELECT + aa.attribute_id, + aa.attribute_name, + aa.pretty_name, + aa.pretty_plural, + aa.default_value, + aa.storage, + aa.datatype, + aa.sort_order, + coalesce(aa.table_name, at.table_name) as table_name, + coalesce(aa.column_name, aa.attribute_name) as column_name, + keywords.heading AS category_heading + FROM + acs_attributes aa, + ca_attributes ca, + acs_object_types at, + ( + select + subtree.keyword_id, + subtree.heading + from cr_keywords parent, cr_keywords subtree + where parent.keyword_id = :keyword_id + and parent.tree_sortkey between subtree.tree_sortkey and tree_right(subtree.tree_sortkey) + ) keywords + WHERE + aa.attribute_id = ca.attribute_id + AND + ca.keyword_id = keywords.keyword_id + AND + aa.object_type = :content_type + AND + at.object_type = :content_type + $storage_stub + + + +