| От | Harald Fuchs |
|---|---|
| Тема | Re: Converting string to IN query |
| Дата | |
| Msg-id | pu4p4f6uo8.fsf@srv.protecting.net обсуждение |
| Ответ на | Converting string to IN query ("Andrus" <kobruleht2@hot.ee>) |
| Ответы |
how to return the first record from the sorted records which may
have duplicated value.
|
| Список | pgsql-general |
In article <gadsb6$2v2d$1@news.hub.org>,
"Andrus" <kobruleht2@hot.ee> writes:
> I found that following query works:
> create temp table test ( test int ) on commit drop;
> insert into test values(1);
> select * from test where test = ANY ( '{1,2}' );
> Is this best solution ?
> Will it work without causing stack overflow with 8.2 server default
> settings
> if string contains some thousands numbers ?
If you get thousands of numbers, it is safer and maybe also faster to
put them into a temporary table, analyze it, and then join it to the
table in question.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера