pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jorge Godoy <jgodoy@gmail.com>
To: Richard Broersma Jr <rabroersma@yahoo.com>
Cc: Alban Hertroys <alban@magproductions.nl>
Cc: Jim C. Nasby <jnasby@pervasive.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [SQL] (Ab)Using schemas and inheritance
Date: Wed, 24 May 2006 14:56:43 -0300
Message-ID: <200605241456.45645.jgodoy@gmail.com> (raw)
In-Reply-To: <20060524174855.47650.qmail@web31807.mail.mud.yahoo.com>
References: <20060524174855.47650.qmail@web31807.mail.mud.yahoo.com>

Em Quarta 24 Maio 2006 14:48, Richard Broersma Jr escreveu:
>
> From what I've read I am not sure that an Index created on the base/parent
> table will help when preforming select queries on data across all of the
> children.  If I interpret the "Caveats" correctly I would assume that the
> index will only apply to data that is inserted directly into the
> base/parent table.

It won't.  What I was saying is that I don't need an index just for this 
reason because data partitioning would be intrinsic to the inheritance 
solution.  I was thinking as described in 
http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html  
(please, see 5.9.2, specially).

With his solution I'd need an index to have this partitioning implemented and 
I'd suffer without it.  With inheritance I just need this index if I'm 
actually operating with dates, not to just retrieve the right data for a 
given year (whatever that means ;-)).

> From the Manual:
>
> 5.8.1. Caveats
>
> ...
>
> A serious limitation of the inheritance feature is that indexes (including
> unique constraints) and foreign key constraints only apply to single
> tables, not to their inheritance children. This is true on both the
> referencing and referenced sides of a foreign key constraint.

This is why, in one of the messages, I've said that I'd have to create indices 
for children tables.  But hey, it is nice that you're also helping us 
here :-)  Thanks! :-)

-- 
Jorge Godoy      <jgodoy@gmail.com>




view thread (16+ messages)  latest in thread

Message-ID: <200605241456.45645.jgodoy@gmail.com>
Permalink:  ../200605241456.45645.jgodoy@gmail.com/
Also on:    postgresql.org/message-id/200605241456.45645.jgodoy@gmail.com

 · 

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-sql@postgresql.org
  Cc: jgodoy@gmail.com, rabroersma@yahoo.com, alban@magproductions.nl, jnasby@pervasive.com, pgsql-general@postgresql.org
  Subject: Re: [SQL] (Ab)Using schemas and inheritance
  In-Reply-To: <200605241456.45645.jgodoy@gmail.com>

* 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