Fix obj_description() and col_description() functions to work reliably
authorTom Lane <[email protected]>
Tue, 30 Apr 2002 21:01:52 +0000 (21:01 +0000)
committerTom Lane <[email protected]>
Tue, 30 Apr 2002 21:01:52 +0000 (21:01 +0000)
in presence of schemas.

src/include/catalog/pg_proc.h

index a203b2b735e083311b74fd265b6215d55d98423b..4bb5df99d08f02472647501d125efae7f5fa2c8c 100644 (file)
@@ -1493,9 +1493,9 @@ DESCR("date difference preserving months and years");
 DATA(insert OID = 1200 (  reltime                 PGNSP PGUID 12 f t f t f i 1  703 "23" 100 0 0 100  int4reltime - _null_ ));
 DESCR("convert int4 to reltime");
 
-DATA(insert OID = 1215 (  obj_description      PGNSP PGUID 14 f t f t f s 2    25 "26 19" 100 0 0 100  "select description from pg_description where objoid = $1 and classoid = (select oid from pg_class where relname = $2) and objsubid = 0" - _null_ ));
+DATA(insert OID = 1215 (  obj_description      PGNSP PGUID 14 f t f t f s 2    25 "26 19" 100 0 0 100  "select description from pg_description where objoid = $1 and classoid = (select oid from pg_class where relname = $2 and relnamespace = PGNSP) and objsubid = 0" - _null_ ));
 DESCR("get description for object id and catalog name");
-DATA(insert OID = 1216 (  col_description      PGNSP PGUID 14 f t f t f s 2    25 "26 23" 100 0 0 100  "select description from pg_description where objoid = $1 and classoid = (select oid from pg_class where relname = \'pg_class\') and objsubid = $2" - _null_ ));
+DATA(insert OID = 1216 (  col_description      PGNSP PGUID 14 f t f t f s 2    25 "26 23" 100 0 0 100  "select description from pg_description where objoid = $1 and classoid = \'pg_catalog.pg_class\'::regclass and objsubid = $2" - _null_ ));
 DESCR("get description for table column");
 
 DATA(insert OID = 1217 (  date_trunc      PGNSP PGUID 12 f t f t f i 2 1184 "25 1184" 100 0 0 100      timestamptz_trunc - _null_ ));