Index on function that returns type with sub fields

From: Desmond Coertzen <patrolliekaptein(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Index on function that returns type with sub fields
Date: 2010-12-23 16:34:31
Message-ID: AANLkTin-4EsDC5D9eF58-QFcUx=sh_c1W---e_-bWxG8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello,

Is is possible to create an index on a field on a function that returns a
data type that contains subfields?

It is possible to do this:
create index indx_test
on address
(sp_address_text_to_template(address_text))
where (sp_address_text_to_template(address_text)).city_name =
'some_city_on_some_planet';

,but I would like to create the index without the partial clause to index
results only from sp_address_text_to_template(address_text)).city_name.

Is this possible? How would I write the statement?

Thanks,

Desmond.

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2010-12-23 16:37:51 Re: PostgreSQL 9.0 x64 bit pgbench TPC very low question?
Previous Message tuanhoanganh 2010-12-23 15:20:19 Re: PostgreSQL 9.0 x64 bit pgbench TPC very low question?