Re: Coercing compound types to use generic ROW comparison operators

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: "Randall Lucas" <rlucas(at)tercent(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Coercing compound types to use generic ROW comparison operators
Date: 2007-10-12 15:16:34
Message-ID: 27197.1192202194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Merlin Moncure" <mmoncure(at)gmail(dot)com> writes:
> AIUI, the biggest problem with the current behavior is that there is
> no way to usefully index composite types, it looks like

> create index bar_idx on bar(f);
> create index bar_idx on bar((f).*);
> create index bar_idx on bar((f).a, (f).b);

The last case works, you just don't have enough parentheses.

regression=# create type mytype as (a int, b float);
CREATE TYPE
regression=# create table foo(f mytype);
CREATE TABLE
regression=# create index fooi on foo(((f).a), ((f).b));
CREATE INDEX

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jack Orenstein 2007-10-12 15:28:04 Missing files under pg_data following power failure
Previous Message Relyea, Mike 2007-10-12 15:10:45 Re: Out of memory with ODBC