Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > !                                                   "where reltype not in 
> > ('v','c') and "
> 
> Surely you meant relkind.  Also, there is no 'c' relkind; perhaps you
> meant 's'?  I think v,s,t are all relkinds to exclude here.

Yes, sorry, relkind.  New attached patch applied with your suggested
relkind list.

I got my list of entries from pg_class.h:

#define       RELKIND_INDEX           'i'       /* secondary index */
#define       RELKIND_RELATION        'r'       /* ordinary cataloged heap */
#define       RELKIND_SPECIAL         's'       /* special (non-heap) */
#define       RELKIND_SEQUENCE        'S'       /* SEQUENCE relation */
#define       RELKIND_UNCATALOGED     'u'       /* temporary heap */
#define       RELKIND_TOASTVALUE      't'       /* moved off huge values */
#define       RELKIND_VIEW            'v'       /* view */
#define       RELKIND_COMPOSITE_TYPE  'c'       /* composite type */

Is 't' for toast tables?  If so, we should allow 't', no?  I wasn't sure
about 's'? Is there a disk file associated with it that oid2name should
diplay?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: contrib/oid2name/oid2name.c
===================================================================
RCS file: /cvsroot/pgsql-server/contrib/oid2name/oid2name.c,v
retrieving revision 1.19
diff -c -c -r1.19 oid2name.c
*** contrib/oid2name/oid2name.c 27 Jul 2003 04:51:45 -0000      1.19
--- contrib/oid2name/oid2name.c 27 Jul 2003 19:29:28 -0000
***************
*** 356,362 ****
                snprintf(todo, 1024, "select relfilenode,relname from pg_class order 
by relname");
        else
                snprintf(todo, 1024, "select relfilenode,relname from pg_class "
!                                                       "where reltype not in 
('v','c') and "
                                                        "relname not like 'pg_%%' 
order by relname");
  
        sql_exec(conn, todo, 0);
--- 356,362 ----
                snprintf(todo, 1024, "select relfilenode,relname from pg_class order 
by relname");
        else
                snprintf(todo, 1024, "select relfilenode,relname from pg_class "
!                                                       "where relkind not in 
('v','s', 't') and "
                                                        "relname not like 'pg_%%' 
order by relname");
  
        sql_exec(conn, todo, 0);
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to