Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id BF05E47590F for ; Fri, 26 Apr 2002 11:05:28 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Fri Apr 26 17:05:28 2002 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id RAA03560 for ; Fri, 26 Apr 2002 17:05:28 +0200 (METDST) From: Christoph Haller Message-Id: <200204261505.RAA18337@rodos> Subject: view on system tables upgrade? To: pgsql-sql@postgresql.org Date: Fri, 26 Apr 2002 17:05:27 METDST X-Mailer: Elm [revision: 212.4] X-Archive-Number: 200204/322 X-Sequence-Number: 7586 I've moved from 7.1.2 to 7.2.1 and now a view does no longer work as intended create view pgsql_usertables as select upper(u.usename) AS TBL_OWNER, upper(t.typname) AS TBL_NAME, upper(a.attname) AS COL_NAME, a.atttypid AS COL_TYPE, int4larger(a.attlen, a.atttypmod - 4) AS COL_LENGTH, CASE WHEN a.attnotnull=true THEN 0 ELSE 1 END AS COL_NULL, a.attnum AS COL_SEQ, CASE WHEN EXISTS(SELECT adsrc FROM pg_attrdef d WHERE d.adrelid = a.attrelid and d.adnum = a.attnum) THEN 1 ELSE 0 END AS COL_DEFAULT from pg_user u, pg_type t, pg_attribute a, pg_type n where u.usesysid = t.typowner and t.typrelid = a.attrelid and t.typtype = 'c' and not (t.typname ~* 'pg_') and n.typelem = a.atttypid and substr(n.typname, 1, 1) = '_' and a.attnum > 0 ; CREATE TABLE catsource (sid INTEGER NOT NULL, name VARCHAR(64) NOT NULL, entrancetime DATETIME NOT NULL ) ; select col_type,col_length,col_null,col_seq,col_name,col_default from pgsql_usertables where tbl_name='CATSOURCE' order by col_seq ; retrieves col_type | col_length | col_null | col_seq | col_name | col_default ----------+------------+----------+---------+----------+------------- 23 | 4 | 0 | 1 | SID | 0 1043 | 64 | 0 | 2 | NAME | 0 (2 rows) All columns of type timestamp have disappeared. Can somebody please give me a hint what happened. Regards, Christoph