Hi,

  How can i create a index to index all the fields that has the type
INTEGER, in the following table:

create type properties_types as enum('INTEGER', 'STRING', 'FLOAT');

create table properties_types(
   value text NOT NULL,
   value_type properties_types NOT NULL
);

insert into properties_types values('1', 'INTEGER');
insert into properties_types values('2', 'INTEGER');
insert into properties_types values('3', 'INTEGER');
insert into properties_types values('4', 'INTEGER');

how do i create index for the integer types?

create index properties_types_index on properties_types
((value ::integer)) where value_type='INTEGER'


Can i use this select with the index?
select valor from properties_types where value::integer<3



Thanks!



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to