pgtoolkit/pgbrowser.py
changeset 86 b61b54aa9f96
parent 85 11a282e23e0d
child 87 3ef717ee9253
equal deleted inserted replaced
85:11a282e23e0d 86:b61b54aa9f96
   415 
   415 
   416         """
   416         """
   417         return self._query('''select pg_get_functiondef(%s);''', [oid])
   417         return self._query('''select pg_get_functiondef(%s);''', [oid])
   418 
   418 
   419     def list_types(self, schema='public'):
   419     def list_types(self, schema='public'):
   420         """List types in schema."""
   420         """List types in schema.
       
   421 
       
   422         http://www.postgresql.org/docs/8.4/static/catalog-pg-type.html
       
   423 
       
   424         """
   421         return self._query('''
   425         return self._query('''
   422             SELECT
   426             SELECT
   423                 t.typname AS "name",
   427                 t.typname AS "name",
   424                 CASE
   428                 CASE
   425                     WHEN t.typtype = 'b' THEN 'base'::text
   429                     WHEN t.typtype = 'b' THEN 'base'::text