Re: Accessing composite type columns in indexes

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Accessing composite type columns in indexes
Дата
Msg-id 02A1C644-A49A-4176-9FDF-CF475D7A585F@myrealbox.com
обсуждение исходный текст
Ответ на Re: Accessing composite type columns in indexes  (Michael Glaesemann <grzm@myrealbox.com>)
Ответы Re: Accessing composite type columns in indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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




В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Accessing composite type columns in indexes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Accessing composite type columns in indexes