From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | jwieck(at)debis(dot)com (Jan Wieck), pgsql-hackers(at)postgresql(dot)org |
Subject: | Re[2]: [HACKERS] psql \d command |
Date: | 1998-10-22 13:11:49 |
Message-ID: | 10633.981022@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Jan,
giovedì, 22 ottobre 98, you wrote:
>>
>> Hi all,
>>
>> I see now \d shows indexes, I tried to display index structure but it
>> show the wrong
>> length of fields:
>>
>> [...]
>>
>> hygea=> \d figure_pkey
>>
>> Table = figure_pkey
>> +----------------------------------+----------------------------------+-------+
>> | Field | Type |
>> Length|
>> +----------------------------------+----------------------------------+-------+
>> it should be:
>> | azienda | char()
>> | -4 |<<-- 11
>> | tipo | char()
>> | -4 |<<-- 02
>> | gruppo | char()
>> | -4 |<<-- 02
>> | inizio_attivita | date
>> | 4 |<<-- 04
>> +----------------------------------+----------------------------------+-------+
JW> The atttypmod value off all index attributes is 0 in
JW> pg_attribute. That's the reason why \d shows this. This
JW> information is not required for indices because the datum
JW> given to the index access methods comes from the heap tuples
JW> and it must already have the correct size if it reaches
JW> there.
JW> For data types of variable size, an atttypmod value of -1
JW> means variable, a value of n means size = n-4 (4 is the size
JW> of the variable length datum header VARHDRSZ). Don't worry,
JW> you cannot select from an index directly, so it doesn't
JW> matter. But psql might get enhanced for 6.5 to lookup the
JW> atttypmod of the indexed field in the table instead of using
JW> that from the index.
I'm not worry, only a aesthetical question. Thanks for reply.
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 1998-10-22 13:34:21 | Re: [HACKERS] psql's help |
Previous Message | Bruce Momjian | 1998-10-22 13:10:49 | Re: [HACKERS] psql's help |