Hi all.
When trying to create an index on a composite type, I need to enclose
the columns in paranthesis. Is this normal?
I don't think so as there's no mention in the friendly manual.
An example:
create type atype as (
atext text,
anint int
);
create table atable (
info text,
compo atype
);
create index i_atable_compo on atable(
((compo).atext),((compo).anint)
);
With single parenthesis, as suggested by the friendly manual, I get a
syntax error close to the "."
test=# create index i_atable_compo on atable(
(compo).atext,(compo).anint
);
ERROR: syntax error at or near "."
LINE 2: (compo).atext,(compo).anint
^
--
Vincenzo Romano
Maybe Computers will never become as intelligent as Humans.
Surely they won't ever become so stupid. [VR-1989]