Re: index elements of a composite?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: peter(at)code42(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: index elements of a composite?
Date: 2004-04-21 04:23:52
Message-ID: 25968.1082521432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Lindquist <peter(at)code42(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tanveer 2004-04-21 06:54:26 Distribution License Enquiry
Previous Message Tom Lane 2004-04-21 04:14:43 Re: [OT] Tom's/Marc's spam filters?