Re: [GENERAL] Views dependency

2007-03-11 Thread Shoaib Mir
Used a different way but finally got my dependent views and table info for a specific view. Here is how I did it: == declare pos integer; wh integer; tot integer; diff integer; outp varchar; viewn varchar; begin viewn := 'v2'; select position('FROM'

[GENERAL] Views dependency

2007-03-10 Thread Shoaib Mir
Suppose I have a view: create view v1 as select * from t1; and another view as: create view v2 as select * from v1; Now is there any query or any catalog table available by which I can get to know the dependency (names of views on which v2 depends) for view v2? I did check the pg_views but

Re: [GENERAL] Views dependency

2007-03-10 Thread Tom Lane
Shoaib Mir [EMAIL PROTECTED] writes: Now is there any query or any catalog table available by which I can get to know the dependency (names of views on which v2 depends) for view v2? If you get up-close-n-personal with pg_depend you can determine that. regards, tom lane

Re: [GENERAL] Views dependency

2007-03-10 Thread Alvaro Herrera
Shoaib Mir escribió: Suppose I have a view: create view v1 as select * from t1; and another view as: create view v2 as select * from v1; Now is there any query or any catalog table available by which I can get to know the dependency (names of views on which v2 depends) for view v2?

Re: [GENERAL] Views dependency

2007-03-10 Thread Shoaib Mir
I can see the following in pg_depend: For view v1: classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype -++--++--+-+- 2618 | 153523 |0 | 1259 | 153521 | 0 | n 2618 | 153523 |