From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com> |
Cc: | Ingmar Brouns <swingi(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net> |
Subject: | Re: BUG #5926: information schema dtd_identifier for element_types, columns, parameters views inconsistent |
Date: | 2011-06-08 15:09:27 |
Message-ID: | 9773.1307545767@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-docs |
> On 11.03.2011 14:18, Ingmar Brouns wrote:
>> ... The reason seems to be
>> that the dtd_identifier of the element_types view has prepended 'a's whereas
>> the dtd_identifiers of the columns and parameter views do not:
>>
>> select column_name,dtd_identifier
>> from information_schema.columns c
>> where c.table_schema = 'public'
>> and c.table_name = 'test_table';
>>
>> column_name | dtd_identifier
>> -------------+----------------
>> a | 1
>> b | 2
>> c | 3
>> (3 rows)
>>
>> select dtd_identifier
>> from information_schema.element_types e
>> where e.object_schema = 'public'
>> and e.object_name = 'test_table';
>>
>> dtd_identifier
>> ----------------
>> a1
>> a3
>> (2 rows)
>>
>> The element_types view has a column 'collection_type_identifier', this
>> column is not present in the documentation. It is defined exactly as the
>> dtd_identifier, only then without the prepended 'a':
The omission of collection_type_identifier from the docs is clearly a
doc bug. However, it looks to me like you've identified an error in the
view definition, not only a doc bug. I think the values of the
dtd_identifier and collection_type_identifier columns are swapped, ie,
we ought to be prepending 'a' to the collection_type_identifier not the
dtd_identifier. As far as I can tell from the spec, dtd_identifier
ought to be the identifier of the element type, while
collection_type_identifier should be a made-up identifier for the array
type. That would make the sample query given in the docs correct.
If my analysis is correct, we really ought to try to fix this in time
for beta2, since there's no way to fix it without a forced initdb.
Comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-06-08 17:38:00 | Re: BUG #5926: information schema dtd_identifier for element_types, columns, parameters views inconsistent |
Previous Message | Craig Ringer | 2011-06-08 09:24:41 | Re: BUG #6055: connection refused |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-06-08 17:38:00 | Re: BUG #5926: information schema dtd_identifier for element_types, columns, parameters views inconsistent |
Previous Message | Fujii Masao | 2011-06-06 17:27:34 | Re: CIDR address in pg_hba.conf |