Re: index elements of a composite? - Mailing list pgsql-general

From Tom Lane
Subject Re: index elements of a composite?
Date
Msg-id 25968.1082521432@sss.pgh.pa.us
Whole thread Raw
In response to index elements of a composite?  (Peter Lindquist <peter@code42.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: [OT] Tom's/Marc's spam filters?
Next
From: Andrew Kelly
Date:
Subject: Re: convert result to uppercase