X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C76BC5345F for ; Wed, 27 Apr 2005 15:36:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73891-10 for ; Wed, 27 Apr 2005 18:36:49 +0000 (GMT) Received: from mecho.sysmaster.com (unknown [65.119.37.45]) by svr1.postgresql.org (Postfix) with ESMTP id 1183D52D90 for ; Wed, 27 Apr 2005 15:36:47 -0300 (ADT) Received: from [127.0.0.1] (office.sysmaster.com [65.113.143.60]) by mecho.sysmaster.com (8.11.6/8.11.6) with ESMTP id j3RIaSP16849; Wed, 27 Apr 2005 10:36:28 -0800 Message-ID: <426FDB8E.8010408@sysmaster.com> Date: Wed, 27 Apr 2005 11:35:58 -0700 From: Lyubomir Petrov User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mario Soto Cordones Cc: Alvaro Herrera , pgsql-admin@postgresql.org Subject: Re: catalog of postgres References: <20050427180931.GC27525@dcc.uchile.cl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200504/388 X-Sequence-Number: 17401 Yeah, same here... Here is a test case where tables and views show up with the same relkind... :) $ psql test -c "create table table1(id int); create view view1 as select * from table1;" CREATE VIEW $ psql test -c "select relname, relkind from pg_class where relname in ('table1', 'view1');" | sed -e 's/r$/v/' relname | relkind ---------+--------- table1 | r view1 | r (2 rows) But I believe this is a feature, not a bug. Look at this, it is explained here http://www.postgresql.org/docs/8.0/static/catalog-pg-class.html. Regards, Lyubomir Petrov Mario Soto Cordones wrote: >OK but views and tables for example have the same one relkind > >thank > > > >2005/4/27, Alvaro Herrera : > > >>On Wed, Apr 27, 2005 at 02:02:09PM -0400, Mario Soto Cordones wrote: >> >> >> >>>with this query I obtain the schema name and the objects of this it , but >>> like I can know that they are, that is to say if they are tables, >>>views, functions, sequences, etc ???????? >>> >>> >>See pg_class.relkind. >> >>-- >>Alvaro Herrera () >>"El día que dejes de cambiar dejarás de vivir" >> >> >> > > > >