pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Rod Taylor <pg@rbt.ca>
Cc: Ulrich Wisser <ulrich.wisser@relevanttraffic.se>
Cc: gnari <gnari@simnet.is>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: insert
Date: Fri, 13 Aug 2004 14:01:59 -0400
Message-ID: <25254.1092420119@sss.pgh.pa.us> (raw)
In-Reply-To: <20040813150243.GA2004@wolff.to>
References: <20040813111649.7B4116C4F8@tino.sinectis.com.ar>
	<00cc01c4812b$4e7f02e0$0100000a@wp2000>
	<411CAFA3.90005@relevanttraffic.se>
	<1092401876.16087.236.camel@jester>
	<20040813150243.GA2004@wolff.to>

Bruno Wolff III <bruno@wolff.to> writes:
>   Rod Taylor <pg@rbt.ca> wrote:
>> It is likely that you are missing an index on one of those foreign key'd
>> items.

> I don't think that is too likely as a foreign key reference must be a
> unique key which would have an index. I think the type mismatch
> suggestion is probably what the problem is.

I agree.  It is possible to have a lack-of-index problem on the
referencing column (as opposed to the referenced column), but that
normally only hurts you for deletes from the referenced table.

> The current solution is to make the types match. In 8.0.0 it would probably
> work efficiently as is, though it isn't normal for foreign keys to have a type
> mismatch and he may want to change that anyway.

8.0 will not fix this particular issue, as I did not add any numeric-vs-int
comparison operators.  If we see a lot of complaints we could think
about adding such, but for 8.0 only the more common cases such as
int-vs-bigint are covered.

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <25254.1092420119@sss.pgh.pa.us>
Permalink:  ../25254.1092420119@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25254.1092420119@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruno@wolff.to, pg@rbt.ca, ulrich.wisser@relevanttraffic.se, gnari@simnet.is
  Subject: Re: insert
  In-Reply-To: <25254.1092420119@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox