Pavel Stehule wrote:
> Hello
>
> it's pgAdmin bug. please report it there
Actually it doesn't appear to be...
Using the OPs example code on 8.3 beta 4:
>> CREATE INDEX test_desc_idx1
>> ON test_desc
>> USING btree
>> (f1, f2 desc)
>>
>> CREATE INDEX test_desc_idx2
>> ON test_desc
>> USING btree
>> (f1 desc, f2);
postgres=# select pg_get_indexdef('test_desc_idx1'::regclass, 0, true); pg_get_indexdef
--------------------------------------------------------------------CREATE INDEX test_desc_idx1 ON test_desc USING
btree(f1, f2 DESC)
(1 row)
postgres=# select pg_get_indexdef('test_desc_idx1'::regclass, 1, true);pg_get_indexdef
-----------------f1 DESC
(1 row)
postgres=# select pg_get_indexdef('test_desc_idx1'::regclass, 2, true);pg_get_indexdef
-----------------f2 DESC
(1 row)
postgres=# select pg_get_indexdef('test_desc_idx2'::regclass, 0, true); pg_get_indexdef
--------------------------------------------------------------------CREATE INDEX test_desc_idx2 ON test_desc USING
btree(f1 DESC, f2)
(1 row)
postgres=# select pg_get_indexdef('test_desc_idx2'::regclass, 1, true);pg_get_indexdef
-----------------f1 DESC
(1 row)
postgres=# select pg_get_indexdef('test_desc_idx2'::regclass, 2, true);pg_get_indexdef
----------------- DESCf2
(1 row)
Looks like pg_get_indexdef is unwell :-(
/D