Re[2]: [HACKERS] psql \d command

Поиск
Список
Период
Сортировка
От Sferacarta Software
Тема Re[2]: [HACKERS] psql \d command
Дата
Msg-id 10633.981022@bo.nettuno.it
обсуждение исходный текст
Ответ на Re: [HACKERS] psql \d command  (jwieck@debis.com (Jan Wieck))
Список 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.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] CVS Branch Tagging...
Следующее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] psql's help (the LIMIT stuff)