Re: index elements of a composite?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index elements of a composite?
Дата
Msg-id 25968.1082521432@sss.pgh.pa.us
обсуждение исходный текст
Ответ на index elements of a composite?  (Peter Lindquist <peter@code42.com>)
Список pgsql-general
Peter Lindquist <peter@code42.com> writes:
> bash-2.05a$ cat PG_VERSION
> 7.3

The above is pretty unspecific, please provide "select version()" instead.

> This query returned the correct result of _14_existing_rows_ for the
> payment_id 148004 (each row has a different name):

> select * from t_payment_param where payment_id in (select payment_id
> from t_payment where order_id = 145786);

> Run right afterwords in psql, this query returned only a SINGLE ROW:

> select * from t_payment_param where payment_id in (148004);

This seems mighty broken to me.  Can you reproduce it if you create the
index again?  Are you quite sure you copied the payment_id value
correctly?  For that matter, are you sure the sub-select on order_id
returns only one payment_id?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [OT] Tom's/Marc's spam filters?
Следующее
От: Andrew Kelly
Дата:
Сообщение: Re: convert result to uppercase