X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EF890D1B90E for ; Tue, 30 Mar 2004 16:59:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 64571-08 for ; Tue, 30 Mar 2004 12:59:31 -0400 (AST) Received: from conexa.fciencias.unam.mx (conexa.fciencias.unam.mx [132.248.181.120]) by svr1.postgresql.org (Postfix) with ESMTP id 90565D1B493 for ; Tue, 30 Mar 2004 12:59:28 -0400 (AST) Received: from conexa.fciencias.unam.mx (conexa.fciencias.unam.mx [127.0.0.1]) by conexa.fciencias.unam.mx (8.12.8/8.12.8) with ESMTP id i2UGqTK3017774; Tue, 30 Mar 2004 10:52:29 -0600 Received: (from masm@localhost) by conexa.fciencias.unam.mx (8.12.8/8.12.8/Submit) id i2UGqTQs017772; Tue, 30 Mar 2004 10:52:29 -0600 X-Authentication-Warning: conexa.fciencias.unam.mx: masm set sender to masm@fciencias.unam.mx using -f To: Terry Hampton Cc: pgsql-admin@postgresql.org Subject: Re: Quick System Catalog Query Question References: <40689A62.5080507@limacorp.com> <40697747.4020409@limacorp.com> In-Reply-To: <40697747.4020409@limacorp.com> Message-ID: From: Manuel Sugawara User-Name: Manuel Sugawara User-Mail-Address: masm@fciencias.unam.mx Date: 30 Mar 2004 10:52:29 -0600 Lines: 41 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Portable Code) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/387 X-Sequence-Number: 12956 Terry Hampton writes: > Manuel, > > Many thanks for your quick reply. When I > enter: SELECT * FROM pg_type where typname='varchar'; > > I get: > > typname | typowner | typlen | typprtlen | typbyval | typtype | typisdefined > | typdelim | typrelid | typelem | typinput | typoutput | typreceive | > typsend | typalign | typstorage | typdefault > > ---------+----------+--------+-----------+----------+---------+--------------+----------+----------+---------+-----------+------------+------------+------------+----------+------------+------------ > varchar | 1 | -1 | -1 | f | b | t | , > | 0 | 0 | varcharin | varcharout | varcharin | varcharout | i > | x | > > > > I do not see "1043", thus my original email. OID, among others is a hidden column, you need to explicitly ask for it in your query: SELECT oid, * FROM pg_type WHERE typname='varchar'; > > I'm just now starting to work with OID's. Does every row > in the system catalogs have an OID? Most of them. > reference to another tablename.oid - to get the actual name, simply > use the known OID from the first table as a lookup value into the > second ( reference table ), to get the textual vlaue. ? Correct ? Correct. Regards, Manuel.