From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Fuhr <mike(at)fuhr(dot)org> |
Subject: | Re: Accessing composite type columns in indexes |
Date: | 2006-03-04 05:06:21 |
Message-ID: | 02A1C644-A49A-4176-9FDF-CF475D7A585F@myrealbox.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mar 4, 2006, at 13:44 , Michael Glaesemann wrote:
> On Mar 4, 2006, at 13:31 , Tom Lane wrote:
>> Make sense now?
>
> Yep!
Except, why doesn't it work in the CREATE TABLE statement? One needs
to add the UNIQUE index as a separate command. For example,
-- doesn't work
create table foo
(
foo date_co_interval
, unique (((foo).from_date), ((foo).to_date))
);
-- fails (as expected)
create table foo
(
foo date_co_interval
, unique (((foo.foo).from_date), ((foo.foo).to_date))
);
-- works
create table foo (foo date_co_interval);
create unique index foo_idx on foo (((foo).from_date), ((foo).to_date));
Is this also excluded because of some parser ambiguity?
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-04 05:17:39 | Re: Accessing composite type columns in indexes |
Previous Message | Michael Glaesemann | 2006-03-04 04:44:11 | Re: Accessing composite type columns in indexes |