view on system tables upgrade?

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема view on system tables upgrade?
Дата
Msg-id 200204261505.RAA18337@rodos
обсуждение исходный текст
Ответы Re: view on system tables upgrade?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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_attrdefd WHERE d.adrelid = a.attrelid and d.adnum = a.attnum) THEN 1ELSE0 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
bycol_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 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: abnormal size of the on-disk file.
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Wierd error for COPY command