Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 782F8475ED4 for ; Fri, 8 Nov 2002 00:17:06 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 19A0D475A71 for ; Fri, 8 Nov 2002 00:17:06 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 092DD381787; Fri, 8 Nov 2002 00:17:03 -0500 (EST) From: "Prime Ho" X-Newsgroups: comp.databases.postgresql.sql Subject: get source table.field name from view's field Date: Fri, 8 Nov 2002 13:17:52 +0800 Organization: Optimasoft Lines: 19 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/136 X-Sequence-Number: 10278 Hi, Firstly , sorry about my poor english, I'll do my best to explain what I want. Actually, in most cases, We do query via view, in order to improve the query speed, we'll create index in physical table field that is mapped in view's where statement. So, I got an idea to store view statement in a DataDictionay, while I maintain the DataDictionary's sql statement, program will trigger a function to parse the sql statement, and create index in relative table field automatically. So, the problem is how to get the source table & field name for create index, could it achieve by oid or postgresql already have function to do that? Regards, Ho.