Re: Indexing varchar[]'s
| От | will trillich |
|---|---|
| Тема | Re: Indexing varchar[]'s |
| Дата | |
| Msg-id | 20010615231356.E12269@serensoft.com обсуждение исходный текст |
| Ответ на | Re: Indexing varchar[]'s (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
On Fri, Jun 15, 2001 at 10:46:00AM -0400, Tom Lane wrote:
> "Eric Ridge" <ebr@tcdi.com> writes:
> > If this has been asked and answered before, I am sorry. I've been
> > digging through the mail archives and cannot find this particular
> > question (although some releated to int64[]'s). Is it possible, with
> > 7.1.2, to create an index on a varchar[]?
>
> No, there's no support for indexes on varchar arrays (or any other kind
> of array). What sorts of things do you think such an index should be
> able to do?
i'd bet that it's likely that something could be done with a
subsidiary relation -- instead of
create table burgeoning (
id serial,
stuff text,
amt float8,
xref int8,
xyz varchar[], -- hmm?
primary key (id)
);
maybe this would be a good alternative:
create table streamline (
id serial,
stuff text,
amt float8,
xref int8,
primary key (id)
);
create table subsidiary (
id references streamline(id),
xyz varchar -- aha!
);
create view shebang as
select
streamline.*,
subsidiary.xyz
from
streamline,
subsidiary
where
streamline.id = subsidiary.id
;
may not work in some cases, but it's certainly easier on the
indexing, yes?
--
I figure: if a man's gonna gamble, may as well do it
without plowing. -- Bama Dillert, "Some Came Running"
will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
В списке pgsql-general по дате отправления: