postgresql7.1
select * from $view
select * from $view where
[template::list::page_where_clause -name "views"]
SELECT a.attname
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = '$view'
AND a.attnum > 0
AND a.attrelid = c.oid
AND a.atttypid = t.oid
ORDER BY a.attnum;