On Wed, Nov 10, 2004 at 12:22:17PM +0100, Cao Duy wrote: > there is an index on customer_id > > create table customer( > ... > CONSTRAINT customer_pkey PRIMARY KEY (customer_id), > ... > ) Oh, sorry, I missed it among all the foreign keys. :-) Anyhow, as others have pointed out, try doing a select against 5::bigint instead of just 5 (which is an integer). /* Steinar */ -- Homepage: http://www.sesse.net/