On 5/9/05, Jim C. Nasby <[EMAIL PROTECTED]> wrote:
> On Mon, May 09, 2005 at 02:05:14AM +1000, Brendan Jurd wrote:
> > CREATE TABLE foo (
> > foo int NOT NULL REFERENCES bar INDEX
> > );
> >
> > ... would be marvellous
>
> I agree that it would be handy. Another possibility is throwing a NOTICE
>
> I'm guessing now that we're just talking about a regular index on a
> column that happens to have a foreign key reference to another column.
> Is that the case?
>
That's true, but just as the query planner can use an index for WHERE
conditions, it can use an index for a join condition. So if y
On Mon, 2005-05-09 at 12:40, John D. Burger wrote:
> >> By the way, I presume foreign key indices are used to check for
> >> referential integrity on insert. Can the query planner also use then
> >> somehow?
> >
> > It can use them the same way it can use any other index.
>
> Hmm, I guess I thoug
By the way, I presume foreign key indices are used to check for
referential integrity on insert. Can the query planner also use then
somehow?
It can use them the same way it can use any other index.
Hmm, I guess I thought that "foreign key indices" were some special
kind of index. For instance,
On Mon, May 09, 2005 at 09:04:49AM -0400, John D. Burger wrote:
> >I know that it was decided a fair few releases ago to stop creating an
> >implicit index for each foreign key,
>
> By the way, I presume foreign key indices are used to check for
> referential integrity on insert. Can the query p
I know that it was decided a fair few releases ago to stop creating an
implicit index for each foreign key,
By the way, I presume foreign key indices are used to check for
referential integrity on insert. Can the query planner also use then
somehow?
Thanks.
- John D. Burger
MITRE
---
On Mon, May 09, 2005 at 02:05:14AM +1000, Brendan Jurd wrote:
> CREATE TABLE foo (
> foo int NOT NULL REFERENCES bar INDEX
> );
>
> ... would be marvellous
I agree that it would be handy. Another possibility is throwing a NOTICE
or even WARNING if you create a foreign key that isn't covered by a