Search Postgresql Archives

Re: Accessing composite type columns in indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux