169 похожих чатов

Hello, How can I create FTS index for OID data types

in postgres?

5 ответов

50 просмотров

What is the goal of a full text search on an OID which is simply a number?

Аметистовый-Зяблик Автор вопроса
Родной Снегоход
What is the goal of a full text search on an OID w...

I'm on migration from Oracle to postgres, in oracle side the data types is blob ,it converts as OID in postgres. While creating FTS index it's suggest that the data types should be converted as text.

Аметистовый Зяблик
I'm on migration from Oracle to postgres, in oracl...

The equivalent data type of an Oracle blob is bytea. It's not known, what the content of a binary object is. And OIDs are only used internal in PostgreSQL and they represent a number. You should first extract the blob objects into text, preferable LONG. That can be inserted into PostgreSQL TEXT. And if you are needing text searches there, and only than, create a full text index on that column. TEXT can store up to 2 GB, that's a lot of content.

Аметистовый-Зяблик Автор вопроса
Родной Снегоход
The equivalent data type of an Oracle blob is byte...

In the ora2pg migration, the equivalent data type for BLOB in PostgreSQL is BYTEA. However, when handling BLOB larger than 1GB, PostgreSQL encounters out-of-memory issues. To address this, we decided to use the lo_import method in ora2pg, which changes the data type to OID. The BLOB data is then uploaded and stored separately, with the table only referencing the object ID. However, Full Text Search (FTS) indexes cannot be directly created on OID data types. How can this issue be resolved?

Аметистовый Зяблик
In the ora2pg migration, the equivalent data type ...

You cannot search for text on numbers, which is an OID, therefore no FTS. You cannot search for text on hex data which binary objects are, therefore no FTS. If your binary data is representing text, make it text to be able to use FTS. What's that hard to understand the difference between text and other data types?

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Мелодичный Сырник
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Фетровый Лингвист
2
30500 за редактор? )
Замшевый Алхимик
47
а через ESC-код ?
Виноградная Притча
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
Сентиментальная Вершина
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
Отзывчивая Шестерёнка
14
Добрый день! Скажите пожалуйста, а какие программы вы бы рекомендовали написать для того, чтобы научиться управлять памятью? Можно написать динамический массив, можно связный ...
Клюквенный Як
7
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Волшебный Ленивец
5
Ребят в СИ можно реализовать ООП?
Стеклянный Граммофон
33
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Укропная Путница
20
Карта сайта