Re: Coercing compound types to use generic ROW comparison operators - Mailing list pgsql-general

From Tom Lane
Subject Re: Coercing compound types to use generic ROW comparison operators
Date
Msg-id 27197.1192202194@sss.pgh.pa.us
Whole thread Raw
In response to Re: Coercing compound types to use generic ROW comparison operators  ("Merlin Moncure" <mmoncure@gmail.com>)
Responses Re: Coercing compound types to use generic ROW comparison operators
List pgsql-general
"Merlin Moncure" <mmoncure@gmail.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

pgsql-general by date:

Previous
From: "Relyea, Mike"
Date:
Subject: Re: Out of memory with ODBC
Next
From: Jack Orenstein
Date:
Subject: Missing files under pg_data following power failure