From: Manuel Sugawara <masm@fciencias.unam.mx>
To: Terry Hampton <thampton@limacorp.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Quick System Catalog Query Question
Date: 30 Mar 2004 10:52:29 -0600
Message-ID: <m3r7vawadv.fsf@conexa.fciencias.unam.mx> (raw)
In-Reply-To: <40697747.4020409@limacorp.com>
References: <40689A62.5080507@limacorp.com>
<m3hdw79ubs.fsf@conexa.fciencias.unam.mx>
<40697747.4020409@limacorp.com>
Terry Hampton <thampton@limacorp.com> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: masm@fciencias.unam.mx, thampton@limacorp.com
Subject: Re: Quick System Catalog Query Question
In-Reply-To: <m3r7vawadv.fsf@conexa.fciencias.unam.mx>
References: <40689A62.5080507@limacorp.com> <m3hdw79ubs.fsf@conexa.fciencias.unam.mx> <40697747.4020409@limacorp.com> <m3r7vawadv.fsf@conexa.fciencias.unam.mx>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox