Re: [GENERAL] select from pipe-delimited field

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: [GENERAL] select from pipe-delimited field
Дата
Msg-id 20100824113755.GC29066@depesz.com
обсуждение исходный текст
Ответ на Re: [GENERAL] select from pipe-delimited field  (san man <neelakash21@gmail.com>)
Список pgsql-novice
On Mon, Aug 23, 2010 at 06:07:08PM -0500, san man wrote:
> Thanks for the replies.
> David, I would have normalized it to 2 or more tables, but the number of
> bar-delimited are not fixed and as new data are added the maximum number of
> these values may change. Also, the problem with like I think is that
> matching is not strict and thus might give spurious hits.

The fact that it's not fixed is irrelevant. just add table:

create table synonyms (
    word text,
    synonym text,
    primary key (synonymi, word)
);

and you're fine. you can have as many synonyms per word as you want.

depesz


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

Предыдущее
От: solaimurugan v
Дата:
Сообщение: RESTORE DATABASE BACKUP TO MODIFIED DATABASE
Следующее
От: Florian Henge
Дата:
Сообщение: Re: xml output