Browse files

more complex request for postgresql

SVN Revision: 677
  • Loading branch information...
1 parent cd11ea8 commit 8e11f40bab48ca3667e5f2fdaab1247e0e17a4f4 @nniclausse nniclausse committed Aug 8, 2006
Showing with 12 additions and 0 deletions.
  1. +12 −0 examples/
12 examples/
@@ -45,6 +45,18 @@
<request><pgsql type="sql">SELECT * from users;</pgsql></request>
+ <request><pgsql type='sql'><![CDATA[SELECT n.nspname as "Schema",
+ c.relname as "Name",
+ CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN '%_toto_% END as "Type",
+ u.usename as "Owner"
+FROM pg_catalog.pg_class c
+ LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner
+ LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
+WHERE c.relkind IN ('r','v','S','')
+ AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
+ AND pg_catalog.pg_table_is_visible(c.oid)
+ORDER BY 1,2;]]></pgsql></request>
<request><pgsql type="close"></pgsql></request>

0 comments on commit 8e11f40

Please sign in to comment.